@@ -105,8 +105,8 @@ namespace SL
105
105
106
106
inline void ExtractAndConvertToRGBA (const Image& img, unsigned char * dst, size_t dst_size)
107
107
{
108
- auto totalsize = RowStride (img) * Height (img);
109
- assert (dst_size >= static_cast <size_t >(totalsize ));
108
+
109
+ assert (dst_size >= static_cast <size_t >(RowStride (img) * Height (img) ));
110
110
auto imgsrc = StartSrc (img);
111
111
auto imgdist = dst;
112
112
for (auto h = 0 ; h < Height (img); h++) {
@@ -122,8 +122,7 @@ namespace SL
122
122
}
123
123
inline void ExtractAndConvertToRGB (const Image& img, unsigned char * dst, size_t dst_size)
124
124
{
125
- auto totalsize = Width (img) * 3 * Height (img);
126
- assert (dst_size >= static_cast <size_t >(totalsize));
125
+ assert (dst_size >= static_cast <size_t >(Width (img) * 3 * Height (img)));
127
126
auto imgsrc = StartSrc (img);
128
127
auto imgdist = dst;
129
128
for (auto h = 0 ; h < Height (img); h++) {
@@ -139,8 +138,7 @@ namespace SL
139
138
140
139
inline void ExtractAndConvertToRGB565 (const Image& img, unsigned char * dst, size_t dst_size)
141
140
{
142
- auto totalsize = Width (img) * 2 * Height (img);
143
- assert (dst_size >= static_cast <size_t >(totalsize));
141
+ assert (dst_size >= static_cast <size_t >(Width (img) * 2 * Height (img)));
144
142
auto imgsrc = StartSrc (img);
145
143
auto imgdist = dst;
146
144
for (auto h = 0 ; h < Height (img); h++) {
0 commit comments