diff --git a/src/libslic3r/Config.hpp b/src/libslic3r/Config.hpp index f99b07c8d2..7edd0be5b5 100644 --- a/src/libslic3r/Config.hpp +++ b/src/libslic3r/Config.hpp @@ -2085,11 +2085,11 @@ class ConfigOptionEnumsGenericTempl : public ConfigOptionInts public: ConfigOptionEnumsGenericTempl(const t_config_enum_values *keys_map = nullptr) : keys_map(keys_map) {} explicit ConfigOptionEnumsGenericTempl(const t_config_enum_values *keys_map, size_t size, int value) : ConfigOptionInts(size, value), keys_map(keys_map) {} - explicit ConfigOptionEnumsGenericTempl(std::initializer_list il) : ConfigOptionInts(std::move(il)), keys_map(keys_map) {} + explicit ConfigOptionEnumsGenericTempl(std::initializer_list il) : ConfigOptionInts(std::move(il)) {} explicit ConfigOptionEnumsGenericTempl(const std::vector &vec) : ConfigOptionInts(vec) {} explicit ConfigOptionEnumsGenericTempl(std::vector &&vec) : ConfigOptionInts(std::move(vec)) {} - const t_config_enum_values* keys_map = nullptr; + const t_config_enum_values* keys_map { nullptr }; static ConfigOptionType static_type() { return coEnums; } ConfigOptionType type() const override { return static_type(); } diff --git a/src/libslic3r/Fill/Fill.cpp b/src/libslic3r/Fill/Fill.cpp index a44fa46606..500eb944ac 100644 --- a/src/libslic3r/Fill/Fill.cpp +++ b/src/libslic3r/Fill/Fill.cpp @@ -167,7 +167,7 @@ double calculate_infill_rotation_angle(const PrintObject* object, idx = std::min(idx, (int) object->layers().size() - 1); limit_fill_z = object->get_layer(idx)->print_z + sdx * object->config().layer_height; } - repeats = std::max(--repeats, 0); + repeats = std::max(repeats - 1, 0); } else _noop = true; // set the dumb cycle if (_absolute) { // is absolute diff --git a/src/libslic3r/GCode.cpp b/src/libslic3r/GCode.cpp index 9b82b60b06..114875609b 100644 --- a/src/libslic3r/GCode.cpp +++ b/src/libslic3r/GCode.cpp @@ -5915,9 +5915,9 @@ bool GCode::_needSAFC(const ExtrusionPath &path) }; return std::any_of(std::begin(supported_patterns), std::end(supported_patterns), [&](const InfillPattern pattern) { - return this->on_first_layer() && this->config().bottom_surface_pattern == pattern || - path.role() == erSolidInfill && this->config().internal_solid_infill_pattern == pattern || - path.role() == erTopSolidInfill && this->config().top_surface_pattern == pattern; + return (this->on_first_layer() && this->config().bottom_surface_pattern == pattern) || + (path.role() == erSolidInfill && this->config().internal_solid_infill_pattern == pattern) || + (path.role() == erTopSolidInfill && this->config().top_surface_pattern == pattern); }); } diff --git a/src/libslic3r/Model.cpp b/src/libslic3r/Model.cpp index dbf1174556..4ef737de33 100644 --- a/src/libslic3r/Model.cpp +++ b/src/libslic3r/Model.cpp @@ -1170,7 +1170,7 @@ ModelObject& ModelObject::assign_copy(ModelObject &&rhs) this->sla_support_points = std::move(rhs.sla_support_points); this->sla_points_status = std::move(rhs.sla_points_status); this->sla_drain_holes = std::move(rhs.sla_drain_holes); - this->brim_points = std::move(brim_points); + this->brim_points = std::move(rhs.brim_points); this->layer_config_ranges = std::move(rhs.layer_config_ranges); this->layer_height_profile = std::move(rhs.layer_height_profile); this->printable = std::move(rhs.printable); diff --git a/src/libslic3r/Orient.cpp b/src/libslic3r/Orient.cpp index c09ccf1fae..367d6b0967 100644 --- a/src/libslic3r/Orient.cpp +++ b/src/libslic3r/Orient.cpp @@ -464,7 +464,7 @@ public: } cost += (costs.bottom < params.BOTTOM_MIN) * 100;// +(costs.height_to_bottom_hull_ratio > params.height_to_bottom_hull_ratio_MIN) * 110; - costs.unprintability = costs.unprintability = cost; + costs.unprintability = cost; return cost; } diff --git a/src/slic3r/GUI/Gizmos/GLGizmoRotate.cpp b/src/slic3r/GUI/Gizmos/GLGizmoRotate.cpp index b51bd7d0e4..f9aec93fbb 100644 --- a/src/slic3r/GUI/Gizmos/GLGizmoRotate.cpp +++ b/src/slic3r/GUI/Gizmos/GLGizmoRotate.cpp @@ -709,7 +709,7 @@ GLGizmoRotate3D::RotoptimzeWindow::RotoptimzeWindow(ImGuiWrapper * imgui, wxGetApp().app_config->set("sla_auto_rotate", "method_id", std::to_string(state.method_id)); -#endif SUPPORT_SLA_AUTO_ROTATE +#endif // SUPPORT_SLA_AUTO_ROTATE } if (ImGui::IsItemHovered()) diff --git a/src/slic3r/GUI/Tab.cpp b/src/slic3r/GUI/Tab.cpp index 566aaa93cd..75b6dbb54e 100644 --- a/src/slic3r/GUI/Tab.cpp +++ b/src/slic3r/GUI/Tab.cpp @@ -5613,7 +5613,7 @@ void Tab::rebuild_page_tree() if (sel_item == m_last_select_item) m_last_select_item = item; else - m_last_select_item = NULL; + m_last_select_item = 0; // allow activate page before selection of a page_tree item m_disable_tree_sel_changed_event = false;