From cc71436aef70c0762328e776ac7c6589a8ae9931 Mon Sep 17 00:00:00 2001 From: Lukas Matena Date: Thu, 1 Jun 2023 16:10:33 +0200 Subject: [PATCH] Fixed several warnings --- src/libslic3r/Arrange.cpp | 2 +- src/libslic3r/GCode.cpp | 2 +- src/libslic3r/GCode/WipeTower.cpp | 3 +-- src/slic3r/GUI/Gizmos/GLGizmosCommon.cpp | 2 +- src/slic3r/GUI/Plater.cpp | 2 +- 5 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/libslic3r/Arrange.cpp b/src/libslic3r/Arrange.cpp index b3293e17f..6042c6ded 100644 --- a/src/libslic3r/Arrange.cpp +++ b/src/libslic3r/Arrange.cpp @@ -750,7 +750,7 @@ void arrange(ArrangePolygons &items, d += corr; for (auto &itm : items) - if (itm.bed_idx == bedidx) + if (itm.bed_idx == int(bedidx)) itm.translation += d; } } diff --git a/src/libslic3r/GCode.cpp b/src/libslic3r/GCode.cpp index 357071a61..36b4e3564 100644 --- a/src/libslic3r/GCode.cpp +++ b/src/libslic3r/GCode.cpp @@ -2450,7 +2450,7 @@ void GCode::process_layer_single_object( int extruder_override_id = is_anything_overridden ? layer_tools.wiping_extrusions().get_extruder_override(eec, instance_id) : -1; return print_wipe_extrusions ? extruder_override_id == int(extruder_id) : - extruder_override_id < 0 && extruder_id == correct_extruder_id; + extruder_override_id < 0 && int(extruder_id) == correct_extruder_id; }; ExtrusionEntitiesPtr temp_fill_extrusions; diff --git a/src/libslic3r/GCode/WipeTower.cpp b/src/libslic3r/GCode/WipeTower.cpp index 6e868d148..fa97b848c 100644 --- a/src/libslic3r/GCode/WipeTower.cpp +++ b/src/libslic3r/GCode/WipeTower.cpp @@ -581,7 +581,7 @@ void WipeTower::set_extruder(size_t idx, const PrintConfig& config) m_filpar.push_back(FilamentParameters()); m_filpar[idx].material = config.filament_type.get_at(idx); - m_filpar[idx].is_soluble = config.wipe_tower_extruder == 0 ? config.filament_soluble.get_at(idx) : (idx != config.wipe_tower_extruder - 1); + m_filpar[idx].is_soluble = config.wipe_tower_extruder == 0 ? config.filament_soluble.get_at(idx) : (idx != size_t(config.wipe_tower_extruder - 1)); m_filpar[idx].temperature = config.temperature.get_at(idx); m_filpar[idx].first_layer_temperature = config.first_layer_temperature.get_at(idx); @@ -1292,7 +1292,6 @@ WipeTower::ToolChangeResult WipeTower::finish_layer() // brim (first layer only) if (first_layer) { - box_coordinates box = wt_box; size_t loops_num = (m_wipe_tower_brim_width + spacing/2.f) / spacing; for (size_t i = 0; i < loops_num; ++ i) { diff --git a/src/slic3r/GUI/Gizmos/GLGizmosCommon.cpp b/src/slic3r/GUI/Gizmos/GLGizmosCommon.cpp index 79c77692a..02f30d31d 100644 --- a/src/slic3r/GUI/Gizmos/GLGizmosCommon.cpp +++ b/src/slic3r/GUI/Gizmos/GLGizmosCommon.cpp @@ -391,7 +391,7 @@ void ObjectClipper::render_cut(const std::vector* ignore_idxs) const // Now update the ignore idxs. Find the first element belonging to the next clipper, // and remove everything before it and decrement everything by current number of contours. const int num_of_contours = clipper.first->get_number_of_contours(); - ignore_idxs_local.erase(ignore_idxs_local.begin(), std::find_if(ignore_idxs_local.begin(), ignore_idxs_local.end(), [num_of_contours](size_t idx) { return idx >= num_of_contours; } )); + ignore_idxs_local.erase(ignore_idxs_local.begin(), std::find_if(ignore_idxs_local.begin(), ignore_idxs_local.end(), [num_of_contours](size_t idx) { return idx >= size_t(num_of_contours); } )); for (size_t& idx : ignore_idxs_local) idx -= num_of_contours; } diff --git a/src/slic3r/GUI/Plater.cpp b/src/slic3r/GUI/Plater.cpp index 0c7dd0e6f..5e987d666 100644 --- a/src/slic3r/GUI/Plater.cpp +++ b/src/slic3r/GUI/Plater.cpp @@ -6099,7 +6099,7 @@ void Plater::increase_instances(size_t num, int obj_idx, int inst_idx) if (const auto obj_idxs = get_selection().get_object_idxs(); !obj_idxs.empty()) { // we need a copy made here because the selection changes at every call of increase_instances() const Selection::ObjectIdxsToInstanceIdxsMap content = p->get_selection().get_content(); - for (const size_t& obj_id : obj_idxs) { + for (const unsigned int obj_id : obj_idxs) { if (auto obj_it = content.find(int(obj_id)); obj_it != content.end()) increase_instances(1, int(obj_id), *obj_it->second.rbegin()); }