From 3391a4d238bc255e5266a1bfc164a32a6d45ddf4 Mon Sep 17 00:00:00 2001 From: Filip Sykala - NTB T15p Date: Wed, 25 Oct 2023 20:14:42 +0200 Subject: [PATCH] =?UTF-8?q?Fix:=20../src/slic3r/GUI/Gizmos/GLGizmoSVG.cpp:?= =?UTF-8?q?898:27:=20warning:=20comparison=20of=20integer=20expressions=20?= =?UTF-8?q?of=20different=20signedness:=20=E2=80=98int=E2=80=99=20and=20?= =?UTF-8?q?=E2=80=98unsigned=20int=E2=80=99=20[-Wsign-compare]=20../src/sl?= =?UTF-8?q?ic3r/GUI/Gizmos/GLGizmoSVG.cpp:904:33:=20warning:=20comparison?= =?UTF-8?q?=20of=20integer=20expressions=20of=20different=20signedness:=20?= =?UTF-8?q?=E2=80=98int=E2=80=99=20and=20=E2=80=98const=20size=5Ft?= =?UTF-8?q?=E2=80=99=20{aka=20=E2=80=98const=20long=20unsigned=20int?= =?UTF-8?q?=E2=80=99}=20[-Wsign-compare]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/slic3r/GUI/Gizmos/GLGizmoSVG.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/slic3r/GUI/Gizmos/GLGizmoSVG.cpp b/src/slic3r/GUI/Gizmos/GLGizmoSVG.cpp index 4178c75bd9..bbdd3c2014 100644 --- a/src/slic3r/GUI/Gizmos/GLGizmoSVG.cpp +++ b/src/slic3r/GUI/Gizmos/GLGizmoSVG.cpp @@ -895,13 +895,13 @@ void draw_filled(const ExPolygons &shape, const std::array& co size_t offset = get_offset(x, y); if (data[offset + N - 1] != 0) return; // already setted by line - for (int i = 0; i < N; ++i) + for (unsigned i = 0; i < N; ++i) data[offset + i] = color[i]; }; // anti aliased drawing of lines - auto draw = [&data, data_width, count_lines, get_offset, &color](int x, int y, float brightess) { - if (x < 0 || y < 0 || x >= data_width || y >= count_lines) + auto draw = [&data, width = static_cast(data_width), count_lines, get_offset, &color](int x, int y, float brightess) { + if (x < 0 || y < 0 || x >= width || y >= count_lines) return; // out of image size_t offset = get_offset(x, y); unsigned char &alpha = data[offset + N - 1];