mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-14 18:45:55 +08:00
Fix:
../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:
parent
7b93b5e512
commit
3391a4d238
@ -895,13 +895,13 @@ void draw_filled(const ExPolygons &shape, const std::array<unsigned char, N>& co
|
|||||||
size_t offset = get_offset(x, y);
|
size_t offset = get_offset(x, y);
|
||||||
if (data[offset + N - 1] != 0)
|
if (data[offset + N - 1] != 0)
|
||||||
return; // already setted by line
|
return; // already setted by line
|
||||||
for (int i = 0; i < N; ++i)
|
for (unsigned i = 0; i < N; ++i)
|
||||||
data[offset + i] = color[i];
|
data[offset + i] = color[i];
|
||||||
};
|
};
|
||||||
|
|
||||||
// anti aliased drawing of lines
|
// anti aliased drawing of lines
|
||||||
auto draw = [&data, data_width, count_lines, get_offset, &color](int x, int y, float brightess) {
|
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 >= data_width || y >= count_lines)
|
if (x < 0 || y < 0 || x >= width || y >= count_lines)
|
||||||
return; // out of image
|
return; // out of image
|
||||||
size_t offset = get_offset(x, y);
|
size_t offset = get_offset(x, y);
|
||||||
unsigned char &alpha = data[offset + N - 1];
|
unsigned char &alpha = data[offset + N - 1];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user