diff --git a/src/clipper/clipper_z.hpp b/src/clipper/clipper_z.hpp index 0f31ac11c..e5e7d48ce 100644 --- a/src/clipper/clipper_z.hpp +++ b/src/clipper/clipper_z.hpp @@ -15,4 +15,4 @@ #undef clipper_hpp #undef use_xyz -#endif clipper_z_hpp +#endif // clipper_z_hpp diff --git a/src/libslic3r/Config.cpp b/src/libslic3r/Config.cpp index 577698071..9aab3a0eb 100644 --- a/src/libslic3r/Config.cpp +++ b/src/libslic3r/Config.cpp @@ -249,7 +249,7 @@ ConfigOption* ConfigOptionDef::create_default_option() const // Special case: For a DynamicConfig, convert a templated enum to a generic enum. new ConfigOptionEnumGeneric(this->enum_keys_map, this->default_value->getInt()) : this->default_value->clone(); - return this->create_empty_option(); + return this->create_empty_option(); } // Assignment of the serialization IDs is not thread safe. The Defs shall be initialized from the main thread! diff --git a/src/libslic3r/Config.hpp b/src/libslic3r/Config.hpp index c349ad3e1..334593ab5 100644 --- a/src/libslic3r/Config.hpp +++ b/src/libslic3r/Config.hpp @@ -353,7 +353,7 @@ public: bool apply_override(const ConfigOption *rhs) override { if (this->nullable()) throw std::runtime_error("Cannot override a nullable ConfigOption."); - if (rhs->type() != this->type()) + if (rhs->type() != this->type()) throw std::runtime_error("ConfigOptionVector.apply_override() applied to different types."); auto rhs_vec = static_cast*>(rhs); if (! rhs->nullable()) { @@ -461,7 +461,7 @@ public: for (const double &v : this->values) { if (&v != &this->values.front()) ss << ","; - serialize_single_value(ss, v); + serialize_single_value(ss, v); } return ss.str(); } @@ -607,7 +607,7 @@ public: for (const int &v : this->values) { if (&v != &this->values.front()) ss << ","; - serialize_single_value(ss, v); + serialize_single_value(ss, v); } return ss.str(); } diff --git a/src/libslic3r/Format/AMF.cpp b/src/libslic3r/Format/AMF.cpp index 92c958d8a..8989487cc 100644 --- a/src/libslic3r/Format/AMF.cpp +++ b/src/libslic3r/Format/AMF.cpp @@ -979,7 +979,7 @@ bool store_amf(const char *path, Model *model, const DynamicPrintConfig *config) stream << layer_height_profile.front(); for (size_t i = 1; i < layer_height_profile.size(); ++i) stream << ";" << layer_height_profile[i]; - stream << "\n \n"; + stream << "\n \n"; } // Export layer height ranges including the layer range specific config overrides. diff --git a/src/libslic3r/GCode.cpp b/src/libslic3r/GCode.cpp index 0ccc3ddf5..d7f432fde 100644 --- a/src/libslic3r/GCode.cpp +++ b/src/libslic3r/GCode.cpp @@ -659,7 +659,7 @@ void GCode::do_export(Print *print, const char *path, GCodePreviewData *preview_ if (print->is_step_done(psGCodeExport) && boost::filesystem::exists(boost::filesystem::path(path))) return; - print->set_started(psGCodeExport); + print->set_started(psGCodeExport); BOOST_LOG_TRIVIAL(info) << "Exporting G-code..." << log_memory_info(); @@ -1415,7 +1415,7 @@ static bool custom_gcode_sets_temperature(const std::string &gcode, const int mc // Skip the rest of the line. for (; *ptr != 0 && *ptr != '\r' && *ptr != '\n'; ++ ptr); // Skip the end of line indicators. - for (; *ptr == '\r' || *ptr == '\n'; ++ ptr); + for (; *ptr == '\r' || *ptr == '\n'; ++ ptr); } return temp_set_by_gcode; } diff --git a/src/libslic3r/GCode/ToolOrdering.cpp b/src/libslic3r/GCode/ToolOrdering.cpp index 0a9ec320e..b7d1d57df 100644 --- a/src/libslic3r/GCode/ToolOrdering.cpp +++ b/src/libslic3r/GCode/ToolOrdering.cpp @@ -308,7 +308,7 @@ void ToolOrdering::fill_wipe_tower_partitions(const PrintConfig &config, coordf_ LayerTools lt_new(0.5f * (lt.print_z + lt_object.print_z)); // Find the 1st layer above lt_new. for (j = i + 1; j < m_layer_tools.size() && m_layer_tools[j].print_z < lt_new.print_z - EPSILON; ++ j); - if (std::abs(m_layer_tools[j].print_z - lt_new.print_z) < EPSILON) { + if (std::abs(m_layer_tools[j].print_z - lt_new.print_z) < EPSILON) { m_layer_tools[j].has_wipe_tower = true; } else { LayerTools <_extra = *m_layer_tools.insert(m_layer_tools.begin() + j, lt_new); diff --git a/src/libslic3r/GCode/WipeTower.cpp b/src/libslic3r/GCode/WipeTower.cpp index b35761b5f..ea8465f22 100644 --- a/src/libslic3r/GCode/WipeTower.cpp +++ b/src/libslic3r/GCode/WipeTower.cpp @@ -698,7 +698,7 @@ WipeTower::ToolChangeResult WipeTower::tool_change(size_t tool, bool last_in_lay writer.append(std::string("; material : " + (m_current_tool < m_filpar.size() ? m_filpar[m_current_tool].material : "(NONE)") + " -> " + m_filpar[tool].material + "\n").c_str()) .append(";--------------------\n"); - writer.speed_override_backup(); + writer.speed_override_backup(); writer.speed_override(100); Vec2f initial_position = cleaning_box.ld + Vec2f(0.f, m_depth_traversed); @@ -748,7 +748,7 @@ WipeTower::ToolChangeResult WipeTower::tool_change(size_t tool, bool last_in_lay if (m_current_tool < m_used_filament_length.size()) m_used_filament_length[m_current_tool] += writer.get_and_reset_used_filament_length(); - ToolChangeResult result; + ToolChangeResult result; result.priming = false; result.initial_tool = int(old_tool); result.new_tool = int(m_current_tool); @@ -806,7 +806,7 @@ WipeTower::ToolChangeResult WipeTower::toolchange_Brim(bool sideOnly, float y_of if (m_current_tool < m_used_filament_length.size()) m_used_filament_length[m_current_tool] += writer.get_and_reset_used_filament_length(); - ToolChangeResult result; + ToolChangeResult result; result.priming = false; result.initial_tool = int(old_tool); result.new_tool = int(m_current_tool); @@ -1163,7 +1163,7 @@ WipeTower::ToolChangeResult WipeTower::finish_layer() writer.extrude(box.rd.x() - m_perimeter_width / 2.f, writer.y() + 0.5f * step); writer.extrude(box.ld.x() + m_perimeter_width / 2.f, writer.y()); } - writer.travel(box.rd.x()-m_perimeter_width/2.f,writer.y()); // wipe the nozzle + writer.travel(box.rd.x()-m_perimeter_width/2.f,writer.y()); // wipe the nozzle } else { // Extrude a sparse infill to support the material to be printed above. const float dy = (fill_box.lu.y() - fill_box.ld.y() - m_perimeter_width); @@ -1196,7 +1196,7 @@ WipeTower::ToolChangeResult WipeTower::finish_layer() if (m_current_tool < m_used_filament_length.size()) m_used_filament_length[m_current_tool] += writer.get_and_reset_used_filament_length(); - ToolChangeResult result; + ToolChangeResult result; result.priming = false; result.initial_tool = int(old_tool); result.new_tool = int(m_current_tool); diff --git a/src/libslic3r/LayerRegion.cpp b/src/libslic3r/LayerRegion.cpp index 6fc0b4e37..bfe96d311 100644 --- a/src/libslic3r/LayerRegion.cpp +++ b/src/libslic3r/LayerRegion.cpp @@ -144,7 +144,7 @@ void LayerRegion::process_external_surfaces(const Layer *lower_layer, const Poly } if (! lower_layer_covered->empty()) voids = diff(voids, *lower_layer_covered); - fill_boundaries = diff(fill_boundaries, voids); + fill_boundaries = diff(fill_boundaries, voids); } } @@ -473,4 +473,4 @@ void LayerRegion::export_region_fill_surfaces_to_svg_debug(const char *name) con } } - \ No newline at end of file + diff --git a/src/libslic3r/Print.cpp b/src/libslic3r/Print.cpp index 4d8482743..b275af2f2 100644 --- a/src/libslic3r/Print.cpp +++ b/src/libslic3r/Print.cpp @@ -252,7 +252,7 @@ bool Print::is_step_done(PrintObjectStep step) const { if (m_objects.empty()) return false; - tbb::mutex::scoped_lock lock(this->state_mutex()); + tbb::mutex::scoped_lock lock(this->state_mutex()); for (const PrintObject *object : m_objects) if (! object->is_step_done_unguarded(step)) return false; diff --git a/src/libslic3r/PrintObject.cpp b/src/libslic3r/PrintObject.cpp index 2834d9105..44f1ef875 100644 --- a/src/libslic3r/PrintObject.cpp +++ b/src/libslic3r/PrintObject.cpp @@ -1480,7 +1480,7 @@ SlicingParameters PrintObject::slicing_parameters(const DynamicPrintConfig& full if (object_max_z <= 0.f) object_max_z = (float)model_object.raw_bounding_box().size().z(); - return SlicingParameters::create_from_config(print_config, object_config, object_max_z, object_extruders); + return SlicingParameters::create_from_config(print_config, object_config, object_max_z, object_extruders); } // returns 0-based indices of extruders used to print the object (without brim, support and other helper extrusions) diff --git a/src/libslic3r/SupportMaterial.cpp b/src/libslic3r/SupportMaterial.cpp index 505fdcaf5..46800de9a 100644 --- a/src/libslic3r/SupportMaterial.cpp +++ b/src/libslic3r/SupportMaterial.cpp @@ -783,7 +783,7 @@ namespace SupportMaterialInternal { for (const ExtrusionPath &ep : loop.paths) if (ep.role() == erOverhangPerimeter && ! ep.polyline.empty()) return ep.size() >= (ep.is_closed() ? 3 : 2); - return false; + return false; } static bool has_bridging_perimeters(const ExtrusionEntityCollection &perimeters) { @@ -2125,7 +2125,7 @@ void PrintObjectSupportMaterial::trim_support_layers_by_object( } // $layer->slices contains the full shape of layer, thus including // perimeter's width. $support contains the full shape of support - // material, thus including the width of its foremost extrusion. + // material, thus including the width of its foremost extrusion. // We leave a gap equal to a full extrusion width. support_layer.polygons = diff(support_layer.polygons, polygons_trimming); } @@ -3217,7 +3217,7 @@ void PrintObjectSupportMaterial::generate_toolpaths( density = 0.5f; flow = m_first_layer_flow; // use the proper spacing for first layer as we don't need to align - // its pattern to the other layers + // its pattern to the other layers //FIXME When paralellizing, each thread shall have its own copy of the fillers. filler->spacing = flow.spacing(); filler->link_max_length = coord_t(scale_(filler->spacing * link_max_length_factor / density)); diff --git a/src/slic3r/Config/Snapshot.cpp b/src/slic3r/Config/Snapshot.cpp index 622b31a17..80b6521b6 100644 --- a/src/slic3r/Config/Snapshot.cpp +++ b/src/slic3r/Config/Snapshot.cpp @@ -342,7 +342,7 @@ static void copy_config_dir_single_level(const boost::filesystem::path &path_src ! boost::filesystem::create_directory(path_dst)) throw std::runtime_error(std::string("Slic3r was unable to create a directory at ") + path_dst.string()); - for (auto &dir_entry : boost::filesystem::directory_iterator(path_src)) + for (auto &dir_entry : boost::filesystem::directory_iterator(path_src)) if (Slic3r::is_ini_file(dir_entry)) boost::filesystem::copy_file(dir_entry.path(), path_dst / dir_entry.path().filename(), boost::filesystem::copy_option::overwrite_if_exists); } @@ -351,7 +351,7 @@ static void delete_existing_ini_files(const boost::filesystem::path &path) { if (! boost::filesystem::is_directory(path)) return; - for (auto &dir_entry : boost::filesystem::directory_iterator(path)) + for (auto &dir_entry : boost::filesystem::directory_iterator(path)) if (boost::filesystem::is_regular_file(dir_entry.status()) && boost::algorithm::iends_with(dir_entry.path().filename().string(), ".ini")) boost::filesystem::remove(dir_entry.path()); } @@ -378,7 +378,7 @@ const Snapshot& SnapshotDB::take_snapshot(const AppConfig &app_config, Snapshot: sprintf(name, "filament_%u", i); if (! app_config.has("presets", name)) break; - snapshot.filaments.emplace_back(app_config.get("presets", name)); + snapshot.filaments.emplace_back(app_config.get("presets", name)); } // Vendor specific config bundles and installed printers. for (const std::pair>> &vendor : app_config.vendors()) { @@ -417,7 +417,7 @@ const Snapshot& SnapshotDB::take_snapshot(const AppConfig &app_config, Snapshot: // Backup the presets. for (const char *subdir : { "print", "filament", "printer", "vendor" }) copy_config_dir_single_level(data_dir / subdir, snapshot_dir / subdir); - snapshot.save_ini((snapshot_dir / "snapshot.ini").string()); + snapshot.save_ini((snapshot_dir / "snapshot.ini").string()); assert(m_snapshots.empty() || m_snapshots.back().time_captured <= snapshot.time_captured); m_snapshots.emplace_back(std::move(snapshot)); return m_snapshots.back(); diff --git a/src/slic3r/Config/Version.cpp b/src/slic3r/Config/Version.cpp index 175abff69..3f8f960f1 100644 --- a/src/slic3r/Config/Version.cpp +++ b/src/slic3r/Config/Version.cpp @@ -227,9 +227,9 @@ size_t Index::load(const boost::filesystem::path &path) // End of semver or keyword. break; } - if (*key_end != 0 && *key_end != ' ' && *key_end != '\t' && *key_end != '=') + if (*key_end != 0 && *key_end != ' ' && *key_end != '\t' && *key_end != '=') throw file_parser_error("Invalid keyword or semantic version", path, idx_line); - char *value = left_trim(key_end); + char *value = left_trim(key_end); bool key_value_pair = *value == '='; if (key_value_pair) value = left_trim(value + 1); @@ -245,11 +245,11 @@ size_t Index::load(const boost::filesystem::path &path) if (strcmp(key, "min_slic3r_version") == 0 || strcmp(key, "max_slic3r_version") == 0) { if (! svalue.empty()) semver = Semver::parse(svalue); - if (! semver) + if (! semver) throw file_parser_error(std::string(key) + " must referece a valid semantic version", path, idx_line); - if (strcmp(key, "min_slic3r_version") == 0) + if (strcmp(key, "min_slic3r_version") == 0) ver.min_slic3r_version = *semver; - else + else ver.max_slic3r_version = *semver; } else { // Ignore unknown keys, as there may come new keys in the future. diff --git a/src/slic3r/GUI/BedShapeDialog.cpp b/src/slic3r/GUI/BedShapeDialog.cpp index 90fc0ff80..5624ada9d 100644 --- a/src/slic3r/GUI/BedShapeDialog.cpp +++ b/src/slic3r/GUI/BedShapeDialog.cpp @@ -455,7 +455,7 @@ void BedShapePanel::update_shape() else if (page_idx == SHAPE_CUSTOM) m_shape = m_loaded_shape; - update_preview(); + update_preview(); } // Loads an stl file, projects it to the XY plane and calculates a polygon. diff --git a/src/slic3r/GUI/GLCanvas3D.cpp b/src/slic3r/GUI/GLCanvas3D.cpp index 715d9f806..d0ff17a83 100644 --- a/src/slic3r/GUI/GLCanvas3D.cpp +++ b/src/slic3r/GUI/GLCanvas3D.cpp @@ -928,8 +928,8 @@ bool GLCanvas3D::LegendTexture::generate(const GCodePreviewData& preview_data, c if (items_count > 1) m_original_height += (items_count - 1) * scaled_square_contour; - m_width = (int)next_highest_power_of_2((uint32_t)m_original_width); - m_height = (int)next_highest_power_of_2((uint32_t)m_original_height); + m_width = (int)next_highest_power_of_2((uint32_t)m_original_width); + m_height = (int)next_highest_power_of_2((uint32_t)m_original_height); // generates bitmap wxBitmap bitmap(m_width, m_height); @@ -1882,7 +1882,7 @@ void GLCanvas3D::reload_scene(bool refresh_immediately, bool force_full_scene_re if (m_reload_delayed) return; - bool update_object_list = false; + bool update_object_list = false; if (m_volumes.volumes != glvolumes_new) update_object_list = true; @@ -5070,14 +5070,14 @@ void GLCanvas3D::_load_gcode_extrusion_paths(const GCodePreviewData& preview_dat for (const GCodePreviewData::Extrusion::Layer &layer : preview_data.extrusion.layers) for (const ExtrusionPath &path : layer.paths) ++ num_paths_per_role[size_t(path.role())]; - std::vector> roles_values; + std::vector> roles_values; roles_values.assign(size_t(erCount), std::vector()); for (size_t i = 0; i < roles_values.size(); ++ i) roles_values[i].reserve(num_paths_per_role[i]); - for (const GCodePreviewData::Extrusion::Layer& layer : preview_data.extrusion.layers) + for (const GCodePreviewData::Extrusion::Layer& layer : preview_data.extrusion.layers) for (const ExtrusionPath& path : layer.paths) roles_values[size_t(path.role())].emplace_back(Helper::path_filter(preview_data.extrusion.view_type, path)); - roles_filters.reserve(size_t(erCount)); + roles_filters.reserve(size_t(erCount)); size_t num_buffers = 0; for (std::vector &values : roles_values) { sort_remove_duplicates(values); diff --git a/src/slic3r/GUI/GUI.cpp b/src/slic3r/GUI/GUI.cpp index f94372667..6e8c361c8 100644 --- a/src/slic3r/GUI/GUI.cpp +++ b/src/slic3r/GUI/GUI.cpp @@ -125,7 +125,7 @@ void config_wizard(int reason) if (! wxGetApp().check_unsaved_changes()) return; - try { + try { ConfigWizard wizard(nullptr, static_cast(reason)); wizard.run(wxGetApp().preset_bundle, wxGetApp().preset_updater); } diff --git a/src/slic3r/GUI/GUI_App.cpp b/src/slic3r/GUI/GUI_App.cpp index 80c02ea78..86523cb88 100644 --- a/src/slic3r/GUI/GUI_App.cpp +++ b/src/slic3r/GUI/GUI_App.cpp @@ -725,7 +725,7 @@ bool GUI_App::load_language(wxString language, bool initial) #endif if (initial) message + "\n\nApplication will close."; - wxMessageBox(message, "PrusaSlicer - Switching language failed", wxOK | wxICON_ERROR); + wxMessageBox(message, "PrusaSlicer - Switching language failed", wxOK | wxICON_ERROR); if (initial) std::exit(EXIT_FAILURE); else diff --git a/src/slic3r/GUI/LambdaObjectDialog.cpp b/src/slic3r/GUI/LambdaObjectDialog.cpp index 4d1cb0658..63c8d329c 100644 --- a/src/slic3r/GUI/LambdaObjectDialog.cpp +++ b/src/slic3r/GUI/LambdaObjectDialog.cpp @@ -192,7 +192,7 @@ ConfigOptionsGroupShp LambdaObjectDialog::init_modificator_options_page(const wx else panel->SetSizer(optgroup->sizer); - return optgroup; + return optgroup; } diff --git a/src/slic3r/GUI/MainFrame.cpp b/src/slic3r/GUI/MainFrame.cpp index dfe3a9cf9..7c36f3665 100644 --- a/src/slic3r/GUI/MainFrame.cpp +++ b/src/slic3r/GUI/MainFrame.cpp @@ -917,7 +917,7 @@ void MainFrame::load_config_file() wxString file; if (dlg.ShowModal() == wxID_OK) file = dlg.GetPath(); - if (! file.IsEmpty() && this->load_config_file(file.ToUTF8().data())) { + if (! file.IsEmpty() && this->load_config_file(file.ToUTF8().data())) { wxGetApp().app_config->update_config_dir(get_dir_name(file)); m_last_config = file; } diff --git a/src/slic3r/GUI/OptionsGroup.cpp b/src/slic3r/GUI/OptionsGroup.cpp index c032aac72..698c1e034 100644 --- a/src/slic3r/GUI/OptionsGroup.cpp +++ b/src/slic3r/GUI/OptionsGroup.cpp @@ -133,7 +133,7 @@ void OptionsGroup::append_line(const Line& line, wxStaticText** full_Label/* = n m_options_mode.push_back(option_set[0].opt.mode); // if we have a single option with no label, no sidetext just add it directly to sizer - if (option_set.size() == 1 && label_width == 0 && option_set.front().opt.full_width && + if (option_set.size() == 1 && label_width == 0 && option_set.front().opt.full_width && option_set.front().opt.label.empty() && option_set.front().opt.sidetext.size() == 0 && option_set.front().side_widget == nullptr && line.get_extra_widgets().size() == 0) { diff --git a/src/slic3r/GUI/PresetBundle.cpp b/src/slic3r/GUI/PresetBundle.cpp index d9e90333c..5785fd850 100644 --- a/src/slic3r/GUI/PresetBundle.cpp +++ b/src/slic3r/GUI/PresetBundle.cpp @@ -279,7 +279,7 @@ std::string PresetBundle::load_system_presets() errors_cummulative += "\n"; } } - if (first) { + if (first) { // No config bundle loaded, reset. this->reset(false); } diff --git a/src/slic3r/GUI/Selection.cpp b/src/slic3r/GUI/Selection.cpp index 40fbbbac6..13d4a7360 100644 --- a/src/slic3r/GUI/Selection.cpp +++ b/src/slic3r/GUI/Selection.cpp @@ -410,7 +410,7 @@ void Selection::set_deserialized(EMode mode, const std::vectorselected = false; m_list.clear(); diff --git a/src/slic3r/GUI/WipeTowerDialog.cpp b/src/slic3r/GUI/WipeTowerDialog.cpp index 460683f77..539422545 100644 --- a/src/slic3r/GUI/WipeTowerDialog.cpp +++ b/src/slic3r/GUI/WipeTowerDialog.cpp @@ -371,7 +371,7 @@ void WipingPanel::toggle_advanced(bool user_action) { else m_advanced = !advanced_matches_simple(); // if called from constructor, show what is appropriate - (m_advanced ? m_page_advanced : m_page_simple)->Show(); + (m_advanced ? m_page_advanced : m_page_simple)->Show(); (!m_advanced ? m_page_advanced : m_page_simple)->Hide(); m_widget_button->SetLabel(m_advanced ? _(L("Show simplified settings")) : _(L("Show advanced settings"))); diff --git a/src/slic3r/GUI/wxExtensions.cpp b/src/slic3r/GUI/wxExtensions.cpp index bf5500cf4..59406b6e9 100644 --- a/src/slic3r/GUI/wxExtensions.cpp +++ b/src/slic3r/GUI/wxExtensions.cpp @@ -669,7 +669,7 @@ wxDataViewItem ObjectDataViewModel::Add(const wxString &name, if (has_errors) root->m_bmp = *m_warning_bmp; - m_objects.push_back(root); + m_objects.push_back(root); // notify control wxDataViewItem child((void*)root); wxDataViewItem parent((void*)NULL); @@ -720,7 +720,7 @@ wxDataViewItem ObjectDataViewModel::AddVolumeChild( const wxDataViewItem &parent root->SetBitmap(*m_warning_bmp); // notify control - const wxDataViewItem child((void*)node); + const wxDataViewItem child((void*)node); ItemAdded(parent_item, child); root->m_volumes_cnt++;