File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -31,6 +31,12 @@ class PixelBuffer
3131{
3232public:
3333 using PixelType = T_Pixel;
34+ using Container = std::vector<T_Pixel>;
35+ // Compatibility with Boost < 1.67
36+ using iterator = typename Container::iterator;
37+ using const_iterator = typename Container::const_iterator;
38+ using value_type = typename Container::value_type;
39+ auto size () const { return pixels_.size (); }
3440
3541 PixelBuffer () : width_(0 ), height_(0 ) {}
3642 PixelBuffer (uint16_t width, uint16_t height, T_Pixel defValue);
@@ -64,7 +70,7 @@ class PixelBuffer
6470 uint16_t width_, height_;
6571
6672protected:
67- std::vector<T_Pixel> pixels_;
73+ Container pixels_;
6874};
6975
7076template <typename T_Pixel>
Original file line number Diff line number Diff line change @@ -168,7 +168,7 @@ BOOST_AUTO_TEST_CASE(CreatePalettedBmp)
168168 // Fill with all colors from the palette
169169 BOOST_TEST_REQUIRE (buffer.getNumPixels () >= 256u ); // Make sure we use all colors
170170 int idx = 0 ;
171- for (auto & c : buffer. getPixels () )
171+ for (auto & c : buffer)
172172 {
173173 c = palette->get (idx++);
174174 idx %= 256 ;
You can’t perform that action at this time.
0 commit comments