../src/slic3r/GUI/GLCanvas3D.cpp:3474:46: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<Slic3r::ModelObject*>::size_type’ {aka ‘unsigned int’} [-Wsign-compare]
../src/slic3r/GUI/GLCanvas3D.cpp:3477:58: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<Slic3r::ModelVolume*>::size_type’ {aka ‘unsigned int’} [-Wsign-compare]
../src/slic3r/GUI/Gizmos/GLGizmoEmboss.cpp:249:62: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<Slic3r::ModelObject*>::size_type’ {aka ‘unsigned int’} [-Wsign-compare]
../src/slic3r/GUI/Gizmos/GLGizmoEmboss.cpp:3603:39: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<Slic3r::ModelObject*>::size_type’ {aka ‘unsigned int’} [-Wsign-compare]
This commit is contained in:
Filip Sykala - NTB T15p 2022-12-21 10:51:02 +01:00
parent 4c63d660d1
commit b90e109b41
2 changed files with 4 additions and 4 deletions

View File

@ -3471,10 +3471,10 @@ void GLCanvas3D::on_mouse(wxMouseEvent& evt)
for (int hover_volume_id : m_hover_volume_idxs) { for (int hover_volume_id : m_hover_volume_idxs) {
const GLVolume &hover_gl_volume = *m_volumes.volumes[hover_volume_id]; const GLVolume &hover_gl_volume = *m_volumes.volumes[hover_volume_id];
int object_idx = hover_gl_volume.object_idx(); int object_idx = hover_gl_volume.object_idx();
if (object_idx < 0 || object_idx >= m_model->objects.size()) continue; if (object_idx < 0 || static_cast<size_t>(object_idx) >= m_model->objects.size()) continue;
const ModelObject* hover_object = m_model->objects[object_idx]; const ModelObject* hover_object = m_model->objects[object_idx];
int hover_volume_idx = hover_gl_volume.volume_idx(); int hover_volume_idx = hover_gl_volume.volume_idx();
if (hover_volume_idx < 0 || hover_volume_idx >= hover_object->volumes.size()) continue; if (hover_volume_idx < 0 || static_cast<size_t>(hover_volume_idx) >= hover_object->volumes.size()) continue;
const ModelVolume* hover_volume = hover_object->volumes[hover_volume_idx]; const ModelVolume* hover_volume = hover_object->volumes[hover_volume_idx];
if (!hover_volume->text_configuration.has_value()) continue; if (!hover_volume->text_configuration.has_value()) continue;
m_selection.add_volumes(Selection::EMode::Volume, {(unsigned) hover_volume_id}); m_selection.add_volumes(Selection::EMode::Volume, {(unsigned) hover_volume_id});

View File

@ -246,7 +246,7 @@ void GLGizmoEmboss::create_volume(ModelVolumeType volume_type)
DataBase emboss_data = priv::create_emboss_data_base(m_text, m_style_manager); DataBase emboss_data = priv::create_emboss_data_base(m_text, m_style_manager);
const ModelObjectPtrs &objects = selection.get_model()->objects; const ModelObjectPtrs &objects = selection.get_model()->objects;
// No selected object so create new object // No selected object so create new object
if (selection.is_empty() || object_idx < 0 || object_idx >= objects.size()) { if (selection.is_empty() || object_idx < 0 || static_cast<size_t>(object_idx) >= objects.size()) {
// create Object on center of screen // create Object on center of screen
// when ray throw center of screen not hit bed it create object on center of bed // when ray throw center of screen not hit bed it create object on center of bed
priv::start_create_object_job(emboss_data, screen_center); priv::start_create_object_job(emboss_data, screen_center);
@ -3600,7 +3600,7 @@ bool priv::start_create_volume_on_surface_job(
const ModelObjectPtrs &objects = plater->model().objects; const ModelObjectPtrs &objects = plater->model().objects;
int object_idx = gl_volume->object_idx(); int object_idx = gl_volume->object_idx();
if (object_idx < 0 || object_idx >= objects.size()) return false; if (object_idx < 0 || static_cast<size_t>(object_idx) >= objects.size()) return false;
ModelObject *obj = objects[object_idx]; ModelObject *obj = objects[object_idx];
size_t vol_id = obj->volumes[gl_volume->volume_idx()]->id().id; size_t vol_id = obj->volumes[gl_volume->volume_idx()]->id().id;
auto cond = RaycastManager::AllowVolumes({vol_id}); auto cond = RaycastManager::AllowVolumes({vol_id});