diff --git a/.github/workflows/circularbuffer_build_pipeline.yml b/.github/workflows/circularbuffer_build_pipeline.yml index 6083e3e..fb19c4c 100644 --- a/.github/workflows/circularbuffer_build_pipeline.yml +++ b/.github/workflows/circularbuffer_build_pipeline.yml @@ -1,6 +1,6 @@ name: Build and Test -on: [push] +on: [push, pull_request] env: # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) diff --git a/circular_buffer.h b/circular_buffer.h index a60926f..0c3beec 100644 --- a/circular_buffer.h +++ b/circular_buffer.h @@ -13,7 +13,6 @@ template class CircularBuffer { private: - typedef T value_type; typedef T* pointer; typedef const T* const_pointer; typedef T& reference; @@ -24,6 +23,8 @@ class CircularBuffer { public: + typedef T value_type; + explicit CircularBuffer(size_t size) :_buff{std::unique_ptr(new value_type[size])}, _max_size{size}{}