../src/slic3r/GUI/Gizmos/GLGizmoSVG.cpp:898:27: warning: comparison of integer expressions of different signedness: ‘int’ and ‘unsigned int’ [-Wsign-compare]
../src/slic3r/GUI/Gizmos/GLGizmoSVG.cpp:904:33: warning: comparison of integer expressions of different signedness: ‘int’ and ‘const size_t’ {aka ‘const long unsigned int’} [-Wsign-compare]
This commit is contained in:
Filip Sykala - NTB T15p 2023-10-25 20:14:42 +02:00
parent 7b93b5e512
commit 3391a4d238

View File

@ -895,13 +895,13 @@ void draw_filled(const ExPolygons &shape, const std::array<unsigned char, N>& 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<int>(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];