Fixed several warnings

This commit is contained in:
Lukas Matena 2023-06-01 16:10:33 +02:00
parent efe511cef5
commit cc71436aef
5 changed files with 5 additions and 6 deletions

View File

@ -750,7 +750,7 @@ void arrange(ArrangePolygons &items,
d += corr; d += corr;
for (auto &itm : items) for (auto &itm : items)
if (itm.bed_idx == bedidx) if (itm.bed_idx == int(bedidx))
itm.translation += d; itm.translation += d;
} }
} }

View File

@ -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; int extruder_override_id = is_anything_overridden ? layer_tools.wiping_extrusions().get_extruder_override(eec, instance_id) : -1;
return print_wipe_extrusions ? return print_wipe_extrusions ?
extruder_override_id == int(extruder_id) : 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; ExtrusionEntitiesPtr temp_fill_extrusions;

View File

@ -581,7 +581,7 @@ void WipeTower::set_extruder(size_t idx, const PrintConfig& config)
m_filpar.push_back(FilamentParameters()); m_filpar.push_back(FilamentParameters());
m_filpar[idx].material = config.filament_type.get_at(idx); 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].temperature = config.temperature.get_at(idx);
m_filpar[idx].first_layer_temperature = config.first_layer_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) // brim (first layer only)
if (first_layer) { if (first_layer) {
box_coordinates box = wt_box;
size_t loops_num = (m_wipe_tower_brim_width + spacing/2.f) / spacing; size_t loops_num = (m_wipe_tower_brim_width + spacing/2.f) / spacing;
for (size_t i = 0; i < loops_num; ++ i) { for (size_t i = 0; i < loops_num; ++ i) {

View File

@ -391,7 +391,7 @@ void ObjectClipper::render_cut(const std::vector<size_t>* ignore_idxs) const
// Now update the ignore idxs. Find the first element belonging to the next clipper, // 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. // and remove everything before it and decrement everything by current number of contours.
const int num_of_contours = clipper.first->get_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) for (size_t& idx : ignore_idxs_local)
idx -= num_of_contours; idx -= num_of_contours;
} }

View File

@ -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()) { 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() // 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(); 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()) if (auto obj_it = content.find(int(obj_id)); obj_it != content.end())
increase_instances(1, int(obj_id), *obj_it->second.rbegin()); increase_instances(1, int(obj_id), *obj_it->second.rbegin());
} }