diff options
Diffstat (limited to 'ue2/imgsynth2/cpixelformat_bgr24.cpp')
| -rw-r--r-- | ue2/imgsynth2/cpixelformat_bgr24.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/ue2/imgsynth2/cpixelformat_bgr24.cpp b/ue2/imgsynth2/cpixelformat_bgr24.cpp index bc95ab9..2332142 100644 --- a/ue2/imgsynth2/cpixelformat_bgr24.cpp +++ b/ue2/imgsynth2/cpixelformat_bgr24.cpp | |||
| @@ -6,6 +6,7 @@ | |||
| 6 | */ | 6 | */ |
| 7 | 7 | ||
| 8 | #include <boost/numeric/conversion/cast.hpp> | 8 | #include <boost/numeric/conversion/cast.hpp> |
| 9 | #include <assert.h> | ||
| 9 | #include "cpixelformat_bgr24.h" | 10 | #include "cpixelformat_bgr24.h" |
| 10 | #include "cbitmap.h" | 11 | #include "cbitmap.h" |
| 11 | 12 | ||
| @@ -15,6 +16,7 @@ void CPixelFormat_BGR24::getPixel(RGBPIXEL& pixel, uint32_t x, uint32_t y) | |||
| 15 | { | 16 | { |
| 16 | if (m_bitmap->getPixelData() == NULL) | 17 | if (m_bitmap->getPixelData() == NULL) |
| 17 | throw PixelFormatError("No pixelbuffer allocated."); | 18 | throw PixelFormatError("No pixelbuffer allocated."); |
| 19 | assert(m_bitmap->getPixelDataSize() > 0); | ||
| 18 | 20 | ||
| 19 | /* if the y-coordinates are mirrored */ | 21 | /* if the y-coordinates are mirrored */ |
| 20 | if (m_bitmap->isMirrored()) | 22 | if (m_bitmap->isMirrored()) |
| @@ -37,6 +39,7 @@ void CPixelFormat_BGR24::setPixel(const RGBPIXEL& pixel, uint32_t x, uint32_t y) | |||
| 37 | { | 39 | { |
| 38 | if (m_bitmap->getPixelData() == NULL) | 40 | if (m_bitmap->getPixelData() == NULL) |
| 39 | throw PixelFormatError("No pixelbuffer allocated."); | 41 | throw PixelFormatError("No pixelbuffer allocated."); |
| 42 | assert(m_bitmap->getPixelDataSize() > 0); | ||
| 40 | 43 | ||
| 41 | /* if the y-coordinates are mirrored */ | 44 | /* if the y-coordinates are mirrored */ |
| 42 | if (m_bitmap->isMirrored()) | 45 | if (m_bitmap->isMirrored()) |
