Fix for: ../src/slic3r/GUI/Jobs/CreateFontStyleImagesJob.cpp: In lambda function: ../src/slic3r/GUI/Jobs/CreateFontStyleImagesJob.cpp:104:29: warning: comparison of integer expressions of different signedness: 'int' and 'size_t' {aka 'long unsigned int'} [-Wsign-compare] 104 | for (int x=0; x < width; ++x) | ~~^~~~~~~ ../src/slic3r/GUI/Jobs/CreateFontStyleImagesJob.cpp:105:35: warning: comparison of integer expressions of different signedness: 'int' and 'size_t' {aka 'long unsigned int'} [-Wsign-compare] 105 | for (int y = 0; y < height; ++y) { | ~~^~~~~~~~

This commit is contained in:
Filip Sykala 2022-03-24 09:45:40 +01:00
parent 0d77aaaa8d
commit 2143489658

View File

@ -101,8 +101,8 @@ void CreateFontStyleImagesJob::process(Ctl &ctl)
assert((offset.x() + width) <= w);
assert((offset.y() + height) <= h);
const unsigned char *ptr2 = (const unsigned char *) ptr;
for (int x=0; x < width; ++x)
for (int y = 0; y < height; ++y) {
for (size_t x = 0; x < width; ++x)
for (size_t y = 0; y < height; ++y) {
size_t index = (offset.y() + y)*w + offset.x() + x;
assert(index < w * h);
pix[index] = ptr2[y * width + x];