From b5573f959b2f830516617abd1123501f3e28b31f Mon Sep 17 00:00:00 2001 From: Vojtech Bubnik Date: Thu, 6 May 2021 14:43:36 +0200 Subject: [PATCH] Refactoring for code clarity: Replaced this->m_xxx with m_xxx as the m_ prefix already signifies a class local variable. --- src/libslic3r/EdgeGrid.cpp | 2 +- src/libslic3r/GCode/WipeTower.cpp | 8 ++++---- src/libslic3r/GCode/WipeTower.hpp | 7 +++---- src/libslic3r/Model.cpp | 4 ++-- src/libslic3r/Model.hpp | 8 ++++---- src/libslic3r/MutablePolygon.hpp | 10 +++++----- src/libslic3r/Optimize/NLoptOptimizer.hpp | 4 ++-- src/libslic3r/Preset.cpp | 4 ++-- src/libslic3r/Print.hpp | 4 ++-- src/libslic3r/PrintObject.cpp | 6 +++--- src/libslic3r/SLAPrint.hpp | 2 +- src/libslic3r/SupportMaterial.cpp | 6 +++--- src/slic3r/GUI/BackgroundSlicingProcess.cpp | 8 ++++---- src/slic3r/GUI/GLCanvas3D.cpp | 6 +++--- src/slic3r/GUI/OptionsGroup.hpp | 2 +- src/slic3r/GUI/Plater.cpp | 8 ++++---- src/slic3r/GUI/PresetComboBoxes.cpp | 10 +++++----- src/slic3r/GUI/Tab.cpp | 6 +++--- src/slic3r/Utils/UndoRedo.cpp | 4 ++-- xs/xsp/Print.xsp | 1 - 20 files changed, 54 insertions(+), 56 deletions(-) diff --git a/src/libslic3r/EdgeGrid.cpp b/src/libslic3r/EdgeGrid.cpp index b9e9ec3dd..1385a51d8 100644 --- a/src/libslic3r/EdgeGrid.cpp +++ b/src/libslic3r/EdgeGrid.cpp @@ -546,7 +546,7 @@ bool EdgeGrid::Grid::inside(const Point &pt_src) return false; coord_t ix = p(0) / m_resolution; coord_t iy = p(1) / m_resolution; - if (ix >= this->m_cols || iy >= this->m_rows) + if (ix >= m_cols || iy >= m_rows) return false; size_t i_closest = (size_t)-1; diff --git a/src/libslic3r/GCode/WipeTower.cpp b/src/libslic3r/GCode/WipeTower.cpp index ae800a5ff..fc6a15b65 100644 --- a/src/libslic3r/GCode/WipeTower.cpp +++ b/src/libslic3r/GCode/WipeTower.cpp @@ -500,9 +500,9 @@ WipeTower::ToolChangeResult WipeTower::construct_tcr(WipeTowerWriter& writer, ToolChangeResult result; result.priming = priming; result.initial_tool = int(old_tool); - result.new_tool = int(this->m_current_tool); - result.print_z = this->m_z_pos; - result.layer_height = this->m_layer_height; + result.new_tool = int(m_current_tool); + result.print_z = m_z_pos; + result.layer_height = m_layer_height; result.elapsed_time = writer.elapsed_time(); result.start_pos = writer.start_pos_rotated(); result.end_pos = priming ? writer.pos() : writer.pos_rotated(); @@ -630,7 +630,7 @@ std::vector WipeTower::prime( bool /*last_wipe_inside_wipe_tower*/) { this->set_layer(first_layer_height, first_layer_height, tools.size(), true, false); - this->m_current_tool = tools.front(); + m_current_tool = tools.front(); // The Prusa i3 MK2 has a working space of [0, -2.2] to [250, 210]. // Due to the XYZ calibration, this working space may shrink slightly from all directions, diff --git a/src/libslic3r/GCode/WipeTower.hpp b/src/libslic3r/GCode/WipeTower.hpp index 6fd7a8e21..b0c5111aa 100644 --- a/src/libslic3r/GCode/WipeTower.hpp +++ b/src/libslic3r/GCode/WipeTower.hpp @@ -164,10 +164,9 @@ public: m_current_layer_finished = false; m_current_shape = (! is_first_layer && m_current_shape == SHAPE_NORMAL) ? SHAPE_REVERSED : SHAPE_NORMAL; if (is_first_layer) { - this->m_num_layer_changes = 0; - this->m_num_tool_changes = 0; - } - else + m_num_layer_changes = 0; + m_num_tool_changes = 0; + } else ++ m_num_layer_changes; // Calculate extrusion flow from desired line width, nozzle diameter, filament diameter and layer_height: diff --git a/src/libslic3r/Model.cpp b/src/libslic3r/Model.cpp index 8b829fc13..bfad61a90 100644 --- a/src/libslic3r/Model.cpp +++ b/src/libslic3r/Model.cpp @@ -1813,7 +1813,7 @@ void ModelVolume::transform_this_mesh(const Transform3d &mesh_trafo, bool fix_le this->set_mesh(std::move(mesh)); TriangleMesh convex_hull = this->get_convex_hull(); convex_hull.transform(mesh_trafo, fix_left_handed); - this->m_convex_hull = std::make_shared(std::move(convex_hull)); + m_convex_hull = std::make_shared(std::move(convex_hull)); // Let the rest of the application know that the geometry changed, so the meshes have to be reloaded. this->set_new_unique_id(); } @@ -1825,7 +1825,7 @@ void ModelVolume::transform_this_mesh(const Matrix3d &matrix, bool fix_left_hand this->set_mesh(std::move(mesh)); TriangleMesh convex_hull = this->get_convex_hull(); convex_hull.transform(matrix, fix_left_handed); - this->m_convex_hull = std::make_shared(std::move(convex_hull)); + m_convex_hull = std::make_shared(std::move(convex_hull)); // Let the rest of the application know that the geometry changed, so the meshes have to be reloaded. this->set_new_unique_id(); } diff --git a/src/libslic3r/Model.hpp b/src/libslic3r/Model.hpp index f66300abc..a65332272 100644 --- a/src/libslic3r/Model.hpp +++ b/src/libslic3r/Model.hpp @@ -180,8 +180,8 @@ private: class LayerHeightProfile final : public ObjectWithTimestamp { public: // Assign the content if the timestamp differs, don't assign an ObjectID. - void assign(const LayerHeightProfile &rhs) { if (! this->timestamp_matches(rhs)) { this->m_data = rhs.m_data; this->copy_timestamp(rhs); } } - void assign(LayerHeightProfile &&rhs) { if (! this->timestamp_matches(rhs)) { this->m_data = std::move(rhs.m_data); this->copy_timestamp(rhs); } } + void assign(const LayerHeightProfile &rhs) { if (! this->timestamp_matches(rhs)) { m_data = rhs.m_data; this->copy_timestamp(rhs); } } + void assign(LayerHeightProfile &&rhs) { if (! this->timestamp_matches(rhs)) { m_data = std::move(rhs.m_data); this->copy_timestamp(rhs); } } std::vector get() const throw() { return m_data; } bool empty() const throw() { return m_data.empty(); } @@ -504,8 +504,8 @@ enum class ConversionType : int { class FacetsAnnotation final : public ObjectWithTimestamp { public: // Assign the content if the timestamp differs, don't assign an ObjectID. - void assign(const FacetsAnnotation& rhs) { if (! this->timestamp_matches(rhs)) { this->m_data = rhs.m_data; this->copy_timestamp(rhs); } } - void assign(FacetsAnnotation&& rhs) { if (! this->timestamp_matches(rhs)) { this->m_data = std::move(rhs.m_data); this->copy_timestamp(rhs); } } + void assign(const FacetsAnnotation& rhs) { if (! this->timestamp_matches(rhs)) { m_data = rhs.m_data; this->copy_timestamp(rhs); } } + void assign(FacetsAnnotation&& rhs) { if (! this->timestamp_matches(rhs)) { m_data = std::move(rhs.m_data); this->copy_timestamp(rhs); } } const std::map>& get_data() const throw() { return m_data; } bool set(const TriangleSelector& selector); indexed_triangle_set get_facets(const ModelVolume& mv, EnforcerBlockerType type) const; diff --git a/src/libslic3r/MutablePolygon.hpp b/src/libslic3r/MutablePolygon.hpp index ef2b61221..14d7787cf 100644 --- a/src/libslic3r/MutablePolygon.hpp +++ b/src/libslic3r/MutablePolygon.hpp @@ -52,7 +52,7 @@ public: PointType* operator->() const { return &m_data->at(m_idx).point; } MutablePolygon& polygon() const { assert(this->valid()); return *m_data; } IndexType size() const { assert(this->valid()); return m_data->size(); } - iterator& remove() { this->m_idx = m_data->remove(*this).m_idx; return *this; } + iterator& remove() { m_idx = m_data->remove(*this).m_idx; return *this; } iterator insert(const PointType pt) const { return m_data->insert(*this, pt); } private: iterator(MutablePolygon *data, IndexType idx) : m_data(data), m_idx(idx) {} @@ -162,10 +162,10 @@ public: return out; }; - bool empty() const { return this->m_size == 0; } - size_t size() const { return this->m_size; } - size_t capacity() const { return this->m_data.capacity(); } - bool valid() const { return this->m_size >= 3; } + bool empty() const { return m_size == 0; } + size_t size() const { return m_size; } + size_t capacity() const { return m_data.capacity(); } + bool valid() const { return m_size >= 3; } void clear() { m_data.clear(); m_size = 0; m_head = IndexType(-1); m_head_free = IndexType(-1); } iterator begin() { return { this, m_head }; } diff --git a/src/libslic3r/Optimize/NLoptOptimizer.hpp b/src/libslic3r/Optimize/NLoptOptimizer.hpp index 826b1632a..f5d314046 100644 --- a/src/libslic3r/Optimize/NLoptOptimizer.hpp +++ b/src/libslic3r/Optimize/NLoptOptimizer.hpp @@ -121,8 +121,8 @@ protected: if(!std::isnan(rel_diff)) nlopt_set_ftol_rel(nl.ptr, rel_diff); if(!std::isnan(stopval)) nlopt_set_stopval(nl.ptr, stopval); - if(this->m_stopcr.max_iterations() > 0) - nlopt_set_maxeval(nl.ptr, this->m_stopcr.max_iterations()); + if(m_stopcr.max_iterations() > 0) + nlopt_set_maxeval(nl.ptr, m_stopcr.max_iterations()); } template diff --git a/src/libslic3r/Preset.cpp b/src/libslic3r/Preset.cpp index c6a86b719..92aa979e4 100644 --- a/src/libslic3r/Preset.cpp +++ b/src/libslic3r/Preset.cpp @@ -1070,7 +1070,7 @@ Preset* PresetCollection::find_preset(const std::string &name, bool first_visibl size_t PresetCollection::first_visible_idx() const { size_t idx = m_default_suppressed ? m_num_default_presets : 0; - for (; idx < this->m_presets.size(); ++ idx) + for (; idx < m_presets.size(); ++ idx) if (m_presets[idx].is_visible) break; if (idx == m_presets.size()) @@ -1282,7 +1282,7 @@ std::vector PresetCollection::merge_presets(PresetCollection &&othe assert(it != new_vendors.end()); preset.vendor = &it->second; } - this->m_presets.emplace(it, std::move(preset)); + m_presets.emplace(it, std::move(preset)); } else duplicates.emplace_back(std::move(preset.name)); } diff --git a/src/libslic3r/Print.hpp b/src/libslic3r/Print.hpp index d341b7eec..25fd0dfc3 100644 --- a/src/libslic3r/Print.hpp +++ b/src/libslic3r/Print.hpp @@ -256,8 +256,8 @@ private: PrintObject(Print* print, ModelObject* model_object, const Transform3d& trafo, PrintInstances&& instances); ~PrintObject() = default; - void config_apply(const ConfigBase &other, bool ignore_nonexistent = false) { this->m_config.apply(other, ignore_nonexistent); } - void config_apply_only(const ConfigBase &other, const t_config_option_keys &keys, bool ignore_nonexistent = false) { this->m_config.apply_only(other, keys, ignore_nonexistent); } + void config_apply(const ConfigBase &other, bool ignore_nonexistent = false) { m_config.apply(other, ignore_nonexistent); } + void config_apply_only(const ConfigBase &other, const t_config_option_keys &keys, bool ignore_nonexistent = false) { m_config.apply_only(other, keys, ignore_nonexistent); } PrintBase::ApplyStatus set_instances(PrintInstances &&instances); // Invalidates the step, and its depending steps in PrintObject and Print. bool invalidate_step(PrintObjectStep step); diff --git a/src/libslic3r/PrintObject.cpp b/src/libslic3r/PrintObject.cpp index 2986ea511..e8f2284fb 100644 --- a/src/libslic3r/PrintObject.cpp +++ b/src/libslic3r/PrintObject.cpp @@ -725,10 +725,10 @@ bool PrintObject::invalidate_step(PrintObjectStep step) } else if (step == posSlice) { invalidated |= this->invalidate_steps({ posPerimeters, posPrepareInfill, posInfill, posIroning, posSupportMaterial }); invalidated |= m_print->invalidate_steps({ psSkirt, psBrim }); - this->m_slicing_params.valid = false; + m_slicing_params.valid = false; } else if (step == posSupportMaterial) { invalidated |= m_print->invalidate_steps({ psSkirt, psBrim }); - this->m_slicing_params.valid = false; + m_slicing_params.valid = false; } // Wipe tower depends on the ordering of extruders, which in turn depends on everything. @@ -1009,7 +1009,7 @@ void PrintObject::process_external_surfaces() // Shrink the holes, let the layer above expand slightly inside the unsupported areas. polygons_append(voids, offset(surface.expolygon, unsupported_width)); } - surfaces_covered[layer_idx] = diff(this->m_layers[layer_idx]->lslices, voids); + surfaces_covered[layer_idx] = diff(m_layers[layer_idx]->lslices, voids); } } ); diff --git a/src/libslic3r/SLAPrint.hpp b/src/libslic3r/SLAPrint.hpp index a94eb35fa..f5f422b3d 100644 --- a/src/libslic3r/SLAPrint.hpp +++ b/src/libslic3r/SLAPrint.hpp @@ -267,7 +267,7 @@ protected: void config_apply(const ConfigBase &other, bool ignore_nonexistent = false) { m_config.apply(other, ignore_nonexistent); } void config_apply_only(const ConfigBase &other, const t_config_option_keys &keys, bool ignore_nonexistent = false) - { this->m_config.apply_only(other, keys, ignore_nonexistent); } + { m_config.apply_only(other, keys, ignore_nonexistent); } void set_trafo(const Transform3d& trafo, bool left_handed) { m_transformed_rmesh.invalidate([this, &trafo, left_handed](){ m_trafo = trafo; m_left_handed = left_handed; }); diff --git a/src/libslic3r/SupportMaterial.cpp b/src/libslic3r/SupportMaterial.cpp index 5b6cbd6bc..5eb9c9433 100644 --- a/src/libslic3r/SupportMaterial.cpp +++ b/src/libslic3r/SupportMaterial.cpp @@ -361,7 +361,7 @@ PrintObjectSupportMaterial::PrintObjectSupportMaterial(const PrintObject *object m_support_params.can_merge_support_regions = m_object_config->support_material_extruder.value == m_object_config->support_material_interface_extruder.value; if (!m_support_params.can_merge_support_regions && (m_object_config->support_material_extruder.value == 0 || m_object_config->support_material_interface_extruder.value == 0)) { // One of the support extruders is of "don't care" type. - auto object_extruders = m_object->print()->object_extruders(); + auto object_extruders = m_object->object_extruders(); if (object_extruders.size() == 1 && *object_extruders.begin() == std::max(m_object_config->support_material_extruder.value, m_object_config->support_material_interface_extruder.value)) // Object is printed with the same extruder as the support. @@ -2764,7 +2764,7 @@ void PrintObjectSupportMaterial::trim_support_layers_by_object( const Layer &object_layer = *object.layers()[i]; bool some_region_overlaps = false; for (LayerRegion *region : object_layer.regions()) { - coordf_t bridging_height = region->region().bridging_height_avg(*this->m_print_config); + coordf_t bridging_height = region->region().bridging_height_avg(*m_print_config); if (object_layer.print_z - bridging_height > support_layer.print_z + gap_extra_above - EPSILON) break; some_region_overlaps = true; @@ -3182,7 +3182,7 @@ struct MyLayerExtruded MyLayerExtruded& operator=(MyLayerExtruded &&rhs) { this->layer = rhs.layer; this->extrusions = std::move(rhs.extrusions); - this->m_polygons_to_extrude = std::move(rhs.m_polygons_to_extrude); + m_polygons_to_extrude = std::move(rhs.m_polygons_to_extrude); rhs.layer = nullptr; return *this; } diff --git a/src/slic3r/GUI/BackgroundSlicingProcess.cpp b/src/slic3r/GUI/BackgroundSlicingProcess.cpp index 498391beb..2869f11c8 100644 --- a/src/slic3r/GUI/BackgroundSlicingProcess.cpp +++ b/src/slic3r/GUI/BackgroundSlicingProcess.cpp @@ -361,7 +361,7 @@ bool BackgroundSlicingProcess::stop() // m_print->state_mutex() shall NOT be held. Unfortunately there is no interface to test for it. std::unique_lock lck(m_mutex); if (m_state == STATE_INITIAL) { -// this->m_export_path.clear(); +// m_export_path.clear(); return false; } // assert(this->running()); @@ -379,7 +379,7 @@ bool BackgroundSlicingProcess::stop() m_state = STATE_IDLE; m_print->set_cancel_callback([](){}); } -// this->m_export_path.clear(); +// m_export_path.clear(); return true; } @@ -496,7 +496,7 @@ Print::ApplyStatus BackgroundSlicingProcess::apply(const Model &model, const Dyn assert(config.opt_enum("printer_technology") == m_print->technology()); Print::ApplyStatus invalidated = m_print->apply(model, config); if ((invalidated & PrintBase::APPLY_STATUS_INVALIDATED) != 0 && m_print->technology() == ptFFF && - !this->m_fff_print->is_step_done(psGCodeExport)) { + !m_fff_print->is_step_done(psGCodeExport)) { // Some FFF status was invalidated, and the G-code was not exported yet. // Let the G-code preview UI know that the final G-code preview is not valid. // In addition, this early memory deallocation reduces memory footprint. @@ -621,7 +621,7 @@ ThumbnailsList BackgroundSlicingProcess::render_thumbnails(const ThumbnailsParam { ThumbnailsList thumbnails; if (m_thumbnail_cb) - this->execute_ui_task([this, ¶ms, &thumbnails](){ thumbnails = this->m_thumbnail_cb(params); }); + this->execute_ui_task([this, ¶ms, &thumbnails](){ thumbnails = m_thumbnail_cb(params); }); return thumbnails; } diff --git a/src/slic3r/GUI/GLCanvas3D.cpp b/src/slic3r/GUI/GLCanvas3D.cpp index c38ed3dcd..26c4a314c 100644 --- a/src/slic3r/GUI/GLCanvas3D.cpp +++ b/src/slic3r/GUI/GLCanvas3D.cpp @@ -3157,7 +3157,7 @@ void GLCanvas3D::on_mouse(wxMouseEvent& evt) } if (m_gizmos.on_mouse(evt)) { - if (wxWindow::FindFocus() != this->m_canvas) + if (wxWindow::FindFocus() != m_canvas) // Grab keyboard focus for input in gizmo dialogs. m_canvas->SetFocus(); @@ -3180,7 +3180,7 @@ void GLCanvas3D::on_mouse(wxMouseEvent& evt) m_mouse.set_move_start_threshold_position_2D_as_invalid(); } - if (evt.ButtonDown() && wxWindow::FindFocus() != this->m_canvas) + if (evt.ButtonDown() && wxWindow::FindFocus() != m_canvas) // Grab keyboard focus on any mouse click event. m_canvas->SetFocus(); @@ -6201,7 +6201,7 @@ void GLCanvas3D::_load_sla_shells() #else v.indexed_vertex_array.load_mesh(mesh); #endif // ENABLE_SMOOTH_NORMALS - v.indexed_vertex_array.finalize_geometry(this->m_initialized); + v.indexed_vertex_array.finalize_geometry(m_initialized); v.shader_outside_printer_detection_enabled = outside_printer_detection_enabled; v.composite_id.volume_id = volume_id; v.set_instance_offset(unscale(instance.shift.x(), instance.shift.y(), 0)); diff --git a/src/slic3r/GUI/OptionsGroup.hpp b/src/slic3r/GUI/OptionsGroup.hpp index 11a52d648..96fe94e0f 100644 --- a/src/slic3r/GUI/OptionsGroup.hpp +++ b/src/slic3r/GUI/OptionsGroup.hpp @@ -228,7 +228,7 @@ public: int config_type() const throw() { return m_config_type; } const t_opt_map& opt_map() const throw() { return m_opt_map; } - void set_config_category_and_type(const wxString &category, int type) { this->m_config_category = category; this->m_config_type = type; } + void set_config_category_and_type(const wxString &category, int type) { m_config_category = category; m_config_type = type; } void set_config(DynamicPrintConfig* config) { m_config = config; m_modelconfig = nullptr; } Option get_option(const std::string& opt_key, int opt_index = -1); Line create_single_option_line(const std::string& title, const wxString& path = wxEmptyString, int idx = -1) /*const*/{ diff --git a/src/slic3r/GUI/Plater.cpp b/src/slic3r/GUI/Plater.cpp index 60f829728..aebec14ee 100644 --- a/src/slic3r/GUI/Plater.cpp +++ b/src/slic3r/GUI/Plater.cpp @@ -1588,8 +1588,8 @@ struct Plater::priv void redo(); void undo_redo_to(size_t time_to_load); - void suppress_snapshots() { this->m_prevent_snapshots++; } - void allow_snapshots() { this->m_prevent_snapshots--; } + void suppress_snapshots() { m_prevent_snapshots++; } + void allow_snapshots() { m_prevent_snapshots--; } void process_validation_warning(const std::string& warning) const; @@ -4198,9 +4198,9 @@ int Plater::priv::get_active_snapshot_index() void Plater::priv::take_snapshot(const std::string& snapshot_name) { - if (this->m_prevent_snapshots > 0) + if (m_prevent_snapshots > 0) return; - assert(this->m_prevent_snapshots >= 0); + assert(m_prevent_snapshots >= 0); UndoRedo::SnapshotData snapshot_data; snapshot_data.printer_technology = this->printer_technology; if (this->view3D->is_layers_editing_enabled()) diff --git a/src/slic3r/GUI/PresetComboBoxes.cpp b/src/slic3r/GUI/PresetComboBoxes.cpp index c6a3006b7..7630c44bb 100644 --- a/src/slic3r/GUI/PresetComboBoxes.cpp +++ b/src/slic3r/GUI/PresetComboBoxes.cpp @@ -134,7 +134,7 @@ void PresetComboBox::OnSelect(wxCommandEvent& evt) auto marker = reinterpret_cast(this->GetClientData(selected_item)); if (marker >= LABEL_ITEM_DISABLED && marker < LABEL_ITEM_MAX) - this->SetSelection(this->m_last_selected); + this->SetSelection(m_last_selected); else if (on_selection_changed && (m_last_selected != selected_item || m_collection->current_is_dirty())) { m_last_selected = selected_item; on_selection_changed(selected_item); @@ -698,7 +698,7 @@ void PlaterPresetComboBox::OnSelect(wxCommandEvent &evt) auto marker = reinterpret_cast(this->GetClientData(selected_item)); if (marker >= LABEL_ITEM_MARKER && marker < LABEL_ITEM_MAX) { - this->SetSelection(this->m_last_selected); + this->SetSelection(m_last_selected); evt.StopPropagation(); if (marker == LABEL_ITEM_MARKER) return; @@ -715,8 +715,8 @@ void PlaterPresetComboBox::OnSelect(wxCommandEvent &evt) } return; } - else if (marker == LABEL_ITEM_PHYSICAL_PRINTER || this->m_last_selected != selected_item || m_collection->current_is_dirty()) - this->m_last_selected = selected_item; + else if (marker == LABEL_ITEM_PHYSICAL_PRINTER || m_last_selected != selected_item || m_collection->current_is_dirty()) + m_last_selected = selected_item; evt.Skip(); } @@ -973,7 +973,7 @@ void TabPresetComboBox::OnSelect(wxCommandEvent &evt) auto marker = reinterpret_cast(this->GetClientData(selected_item)); if (marker >= LABEL_ITEM_DISABLED && marker < LABEL_ITEM_MAX) { - this->SetSelection(this->m_last_selected); + this->SetSelection(m_last_selected); if (marker == LABEL_ITEM_WIZARD_PRINTERS) wxTheApp->CallAfter([this]() { wxGetApp().run_wizard(ConfigWizard::RR_USER, ConfigWizard::SP_PRINTERS); diff --git a/src/slic3r/GUI/Tab.cpp b/src/slic3r/GUI/Tab.cpp index 0e954a906..a037a3b47 100644 --- a/src/slic3r/GUI/Tab.cpp +++ b/src/slic3r/GUI/Tab.cpp @@ -940,7 +940,7 @@ void Tab::update_visibility() page->update_visibility(m_mode, page.get() == m_active_page); rebuild_page_tree(); - if (this->m_type == Preset::TYPE_SLA_PRINT) + if (m_type == Preset::TYPE_SLA_PRINT) update_description_lines(); Layout(); @@ -3141,8 +3141,8 @@ void Tab::select_preset(std::string preset_name, bool delete_current /*=false*/, if (preset_name.empty()) { if (delete_current) { // Find an alternate preset to be selected after the current preset is deleted. - const std::deque &presets = this->m_presets->get_presets(); - size_t idx_current = this->m_presets->get_idx_selected(); + const std::deque &presets = m_presets->get_presets(); + size_t idx_current = m_presets->get_idx_selected(); // Find the next visible preset. size_t idx_new = idx_current + 1; if (idx_new < presets.size()) diff --git a/src/slic3r/Utils/UndoRedo.cpp b/src/slic3r/Utils/UndoRedo.cpp index 697c1209d..6d6753ea2 100644 --- a/src/slic3r/Utils/UndoRedo.cpp +++ b/src/slic3r/Utils/UndoRedo.cpp @@ -755,7 +755,7 @@ namespace UndoRedo { template std::shared_ptr& ImmutableObjectHistory::shared_ptr(StackImpl &stack) { - if (m_shared_object.get() == nullptr && ! this->m_serialized.empty()) { + if (m_shared_object.get() == nullptr && ! m_serialized.empty()) { // Deserialize the object. std::istringstream iss(m_serialized); { @@ -897,7 +897,7 @@ void StackImpl::load_snapshot(size_t timestamp, Slic3r::Model& model, Slic3r::GU this->load_mutable_object(gizmos.id(), gizmos); // Sort the volumes so that we may use binary search. std::sort(m_selection.volumes_and_instances.begin(), m_selection.volumes_and_instances.end()); - this->m_active_snapshot_time = timestamp; + m_active_snapshot_time = timestamp; assert(this->valid()); } diff --git a/xs/xsp/Print.xsp b/xs/xsp/Print.xsp index a6ea590f5..44d58266b 100644 --- a/xs/xsp/Print.xsp +++ b/xs/xsp/Print.xsp @@ -115,7 +115,6 @@ _constant() RETVAL = newRV_noinc((SV*)hv); } %}; - double max_allowed_layer_height() const; bool has_support_material() const; void auto_assign_extruders(ModelObject* model_object); std::string output_filepath(std::string path = "")