From 4a31811410e05b8e3732a77c3e01a22f66b7fbe9 Mon Sep 17 00:00:00 2001 From: Filip Sykala Date: Mon, 22 Nov 2021 18:52:11 +0100 Subject: [PATCH] Fix: ../src/slic3r/GUI/GLModel.cpp:180:36: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector::size_type' {aka 'long unsigned int'} [-Wsign-compare] --- src/slic3r/GUI/GLModel.cpp | 2 +- src/slic3r/GUI/GLModel.hpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/slic3r/GUI/GLModel.cpp b/src/slic3r/GUI/GLModel.cpp index beebab47b..9bfcf87a3 100644 --- a/src/slic3r/GUI/GLModel.cpp +++ b/src/slic3r/GUI/GLModel.cpp @@ -175,7 +175,7 @@ void GLModel::set_color(int entity_id, const std::array& color) } } -const std::array GLModel::get_color(int entity_id) const +const std::array GLModel::get_color(size_t entity_id) const { if (entity_id < 0 || entity_id >= m_render_data.size()) return {}; return m_render_data[entity_id].color; diff --git a/src/slic3r/GUI/GLModel.hpp b/src/slic3r/GUI/GLModel.hpp index eb592568d..cd30258f8 100644 --- a/src/slic3r/GUI/GLModel.hpp +++ b/src/slic3r/GUI/GLModel.hpp @@ -77,7 +77,7 @@ namespace GUI { // if entity_id == -1 set the color of all entities void set_color(int entity_id, const std::array& color); - const std::array get_color(int entity_id=0) const; + const std::array get_color(size_t entity_id = 0U) const; void reset(); void render() const;