From 21434896587d444a3b70907f9932e3e2ada3d5c3 Mon Sep 17 00:00:00 2001 From: Filip Sykala Date: Thu, 24 Mar 2022 09:45:40 +0100 Subject: [PATCH] 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) { | ~~^~~~~~~~ --- src/slic3r/GUI/Jobs/CreateFontStyleImagesJob.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/slic3r/GUI/Jobs/CreateFontStyleImagesJob.cpp b/src/slic3r/GUI/Jobs/CreateFontStyleImagesJob.cpp index 43f93590b4..471771868a 100644 --- a/src/slic3r/GUI/Jobs/CreateFontStyleImagesJob.cpp +++ b/src/slic3r/GUI/Jobs/CreateFontStyleImagesJob.cpp @@ -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];