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