mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-10-26 18:21:18 -06:00 
			
		
		
		
	Fixing clang compiler warnings
This commit is contained in:
		
							parent
							
								
									f72d83993e
								
							
						
					
					
						commit
						5fd279cbc8
					
				
					 18 changed files with 27 additions and 23 deletions
				
			
		|  | @ -920,7 +920,7 @@ static PrintObjectRegions* generate_print_object_regions( | |||
|                             const PrintObjectRegions::VolumeRegion &parent_region = layer_range.volume_regions[parent_region_id]; | ||||
|                             const ModelVolume                      &parent_volume = *parent_region.model_volume; | ||||
|                             if (parent_volume.is_model_part() || parent_volume.is_modifier()) | ||||
|                                 if (PrintObjectRegions::BoundingBox parent_bbox = find_modifier_volume_extents(layer_range, parent_region_id); parent_bbox.intersects(*bbox)) | ||||
|                                 if (PrintObjectRegions::BoundingBox parent_bbox = find_modifier_volume_extents(layer_range, parent_region_id); parent_bbox.intersects(*bbox)) { | ||||
|                                     // Only create new region for a modifier, which actually modifies config of it's parent.
 | ||||
|                                     if (PrintRegionConfig config = region_config_from_model_volume(parent_region.region->config(), nullptr, volume, num_extruders);  | ||||
|                                         config != parent_region.region->config()) { | ||||
|  | @ -928,6 +928,7 @@ static PrintObjectRegions* generate_print_object_regions( | |||
|                                         layer_range.volume_regions.push_back({ &volume, parent_region_id, get_create_region(std::move(config)), bbox }); | ||||
|                                     } else if (parent_model_part_id == -1 && parent_volume.is_model_part()) | ||||
|                                         parent_model_part_id = parent_region_id; | ||||
|                                 } | ||||
|                         } | ||||
|                         if (! added && parent_model_part_id >= 0) | ||||
|                             // This modifier does not override any printable volume's configuration, however it may in the future.
 | ||||
|  |  | |||
|  | @ -2355,7 +2355,7 @@ PrintObjectSupportMaterial::MyLayersPtr PrintObjectSupportMaterial::bottom_conta | |||
|         Polygons *layer_buildplate_covered = buildplate_covered.empty() ? nullptr : &buildplate_covered[layer_id]; | ||||
|         // Filtering the propagated support columns to two extrusions, overlapping by maximum 20%.
 | ||||
|         float column_propagation_filtering_radius = scaled<float>(0.8 * 0.5 * (m_support_params.support_material_flow.spacing() + m_support_params.support_material_flow.width())); | ||||
|         task_group.run([&grid_params, &overhangs_projection, &overhangs_projection_raw, &layer, &layer_support_area, layer_buildplate_covered, column_propagation_filtering_radius | ||||
|         task_group.run([&grid_params, &overhangs_projection, &overhangs_projection_raw, &layer, &layer_support_area, layer_buildplate_covered /* , column_propagation_filtering_radius */ | ||||
| #ifdef SLIC3R_DEBUG  | ||||
|             , iRun, layer_id | ||||
| #endif /* SLIC3R_DEBUG */ | ||||
|  |  | |||
|  | @ -1090,7 +1090,7 @@ indexed_triangle_set its_convex_hull(const std::vector<Vec3f> &pts) | |||
|             centroid += pt; | ||||
|         centroid /= float(pts.size()); | ||||
|     #endif // NDEBUG
 | ||||
|         for (const orgQhull::QhullFacet facet : qhull.facetList()) { | ||||
|         for (const orgQhull::QhullFacet &facet : qhull.facetList()) { | ||||
|             // Collect face vertices first, allocate unique vertices in dst_vertices based on QHull's vertex ID.
 | ||||
|             Vec3i  indices; | ||||
|             int    cnt = 0; | ||||
|  |  | |||
|  | @ -560,9 +560,9 @@ void slice_facet_with_slabs( | |||
|                         // Save the open edge for sure.
 | ||||
|                         type = FacetSliceType::Slicing; | ||||
|                     } else { | ||||
| #ifndef NDEBUG | ||||
|                         const stl_triangle_vertex_indices &neighbor = mesh_triangles[neighbor_idx]; | ||||
|                         float z = *it; | ||||
| #ifndef NDEBUG | ||||
|                         int num_on_plane = (mesh_vertices[neighbor(0)].z() == z) + (mesh_vertices[neighbor(1)].z() == z) + (mesh_vertices[neighbor(2)].z() == z); | ||||
|                         assert(num_on_plane == 2 || num_on_plane == 3); | ||||
| #endif // NDEBUG
 | ||||
|  |  | |||
|  | @ -115,7 +115,7 @@ class TickCodeInfo | |||
|     bool        m_suppress_plus     = false; | ||||
|     bool        m_suppress_minus    = false; | ||||
|     bool        m_use_default_colors= false; | ||||
|     int         m_default_color_idx = 0; | ||||
| //    int         m_default_color_idx = 0;
 | ||||
| 
 | ||||
|     std::vector<std::string>* m_colors {nullptr}; | ||||
| 
 | ||||
|  |  | |||
|  | @ -223,7 +223,8 @@ bool BitmapTextRenderer::GetValueFromEditorCtrl(wxWindow* ctrl, wxVariant& value | |||
|     if (!text_editor || text_editor->GetValue().IsEmpty()) | ||||
|         return false; | ||||
| 
 | ||||
|     if (m_was_unusable_symbol = Slic3r::GUI::Plater::has_illegal_filename_characters(text_editor->GetValue())) | ||||
|     m_was_unusable_symbol = Slic3r::GUI::Plater::has_illegal_filename_characters(text_editor->GetValue()); | ||||
|     if (m_was_unusable_symbol) | ||||
|         return false; | ||||
| 
 | ||||
|     // The icon can't be edited so get its old value and reuse it.
 | ||||
|  |  | |||
|  | @ -535,7 +535,7 @@ wxString file_wildcards(FileType file_type, const std::string &custom_extension) | |||
|         } | ||||
|     } | ||||
| 
 | ||||
|     for (const std::string_view ext : data.file_extensions) | ||||
|     for (const std::string_view &ext : data.file_extensions) | ||||
|         // Only add an extension if it was not added first as the custom extension.
 | ||||
|         if (ext != custom_ext_lower) { | ||||
|             if (title.empty()) { | ||||
|  |  | |||
|  | @ -97,7 +97,7 @@ public: | |||
|     // will be also extended to support additional states, requiring at least one state to remain free out of 19 states.
 | ||||
|     static const constexpr size_t EXTRUDERS_LIMIT = 16; | ||||
| 
 | ||||
|     virtual const float get_cursor_radius_min() const { return CursorRadiusMin; } | ||||
|     const float get_cursor_radius_min() const override { return CursorRadiusMin; } | ||||
| 
 | ||||
| protected: | ||||
|     std::array<float, 4> get_cursor_sphere_left_button_color() const override; | ||||
|  |  | |||
|  | @ -39,7 +39,7 @@ protected: | |||
|     virtual void on_render() override; | ||||
|     virtual void on_render_for_picking() override{};     | ||||
| 
 | ||||
|     virtual CommonGizmosDataID on_get_requirements() const; | ||||
|     CommonGizmosDataID on_get_requirements() const override; | ||||
| 
 | ||||
| private: | ||||
|     void apply_simplify(); | ||||
|  |  | |||
|  | @ -26,7 +26,7 @@ public: | |||
|     bool upload(PrintHostUpload upload_data, ProgressFn prorgess_fn, ErrorFn error_fn) const override; | ||||
|     bool has_auto_discovery() const override { return true; } | ||||
|     bool can_test() const override { return true; } | ||||
|     PrintHostPostUploadActions get_post_upload_actions() const { return PrintHostPostUploadAction::StartPrint; } | ||||
|     PrintHostPostUploadActions get_post_upload_actions() const override { return PrintHostPostUploadAction::StartPrint; } | ||||
|     std::string get_host() const override { return host; } | ||||
|      | ||||
| protected: | ||||
|  |  | |||
|  | @ -25,7 +25,7 @@ public: | |||
| 	bool upload(PrintHostUpload upload_data, ProgressFn prorgess_fn, ErrorFn error_fn) const override; | ||||
| 	bool has_auto_discovery() const override { return false; } | ||||
| 	bool can_test() const override { return true; } | ||||
|     PrintHostPostUploadActions get_post_upload_actions() const { return PrintHostPostUploadAction::StartPrint | PrintHostPostUploadAction::StartSimulation; } | ||||
|     PrintHostPostUploadActions get_post_upload_actions() const override { return PrintHostPostUploadAction::StartPrint | PrintHostPostUploadAction::StartSimulation; } | ||||
| 	std::string get_host() const override { return host; } | ||||
|     | ||||
| private: | ||||
|  |  | |||
|  | @ -26,7 +26,7 @@ public: | |||
| 	bool upload(PrintHostUpload upload_data, ProgressFn prorgess_fn, ErrorFn error_fn) const override; | ||||
| 	bool has_auto_discovery() const override { return false; } | ||||
| 	bool can_test() const override { return true; } | ||||
|     PrintHostPostUploadActions get_post_upload_actions() const { return {}; } | ||||
|     PrintHostPostUploadActions get_post_upload_actions() const override { return {}; } | ||||
| 	std::string get_host() const override { return host; } | ||||
|      | ||||
| private: | ||||
|  |  | |||
|  | @ -25,7 +25,7 @@ public: | |||
| 	bool upload(PrintHostUpload upload_data, ProgressFn prorgess_fn, ErrorFn error_fn) const override; | ||||
| 	bool has_auto_discovery() const override { return false; } | ||||
| 	bool can_test() const override { return true; } | ||||
|     PrintHostPostUploadActions get_post_upload_actions() const { return PrintHostPostUploadAction::StartPrint; } | ||||
|     PrintHostPostUploadActions get_post_upload_actions() const override { return PrintHostPostUploadAction::StartPrint; } | ||||
| 	std::string get_host() const override { return m_host; } | ||||
| 
 | ||||
| private: | ||||
|  |  | |||
|  | @ -28,7 +28,7 @@ public: | |||
|     bool upload(PrintHostUpload upload_data, ProgressFn prorgess_fn, ErrorFn error_fn) const override; | ||||
|     bool has_auto_discovery() const override { return true; } | ||||
|     bool can_test() const override { return true; } | ||||
|     PrintHostPostUploadActions get_post_upload_actions() const { return PrintHostPostUploadAction::StartPrint; } | ||||
|     PrintHostPostUploadActions get_post_upload_actions() const override { return PrintHostPostUploadAction::StartPrint; } | ||||
|     std::string get_host() const override { return m_host; } | ||||
|     const std::string& get_apikey() const { return m_apikey; } | ||||
|     const std::string& get_cafile() const { return m_cafile; } | ||||
|  | @ -57,7 +57,7 @@ public: | |||
| 
 | ||||
|     wxString get_test_ok_msg() const override; | ||||
|     wxString get_test_failed_msg(wxString &msg) const override; | ||||
|     PrintHostPostUploadActions get_post_upload_actions() const { return {}; } | ||||
|     PrintHostPostUploadActions get_post_upload_actions() const override { return {}; } | ||||
| 
 | ||||
| protected: | ||||
|     bool validate_version_text(const boost::optional<std::string> &version_text) const override; | ||||
|  | @ -82,7 +82,7 @@ public: | |||
| 
 | ||||
|     wxString get_test_ok_msg() const override; | ||||
|     wxString get_test_failed_msg(wxString& msg) const override; | ||||
|     PrintHostPostUploadActions get_post_upload_actions() const { return PrintHostPostUploadAction::StartPrint; } | ||||
|     PrintHostPostUploadActions get_post_upload_actions() const override { return PrintHostPostUploadAction::StartPrint; } | ||||
| 
 | ||||
| protected: | ||||
|     bool validate_version_text(const boost::optional<std::string>& version_text) const override; | ||||
|  |  | |||
|  | @ -26,7 +26,7 @@ public: | |||
|     bool upload(PrintHostUpload upload_data, ProgressFn prorgess_fn, ErrorFn error_fn) const override; | ||||
|     bool has_auto_discovery() const override { return false; } | ||||
|     bool can_test() const override { return true; } | ||||
|     PrintHostPostUploadActions get_post_upload_actions() const { return PrintHostPostUploadAction::StartPrint; } | ||||
|     PrintHostPostUploadActions get_post_upload_actions() const override { return PrintHostPostUploadAction::StartPrint; } | ||||
|     bool supports_multiple_printers() const override { return true; } | ||||
|     std::string get_host() const override { return host; } | ||||
|      | ||||
|  |  | |||
|  | @ -148,7 +148,6 @@ bool TCPConsole::is_deadline_over() const | |||
| 
 | ||||
| bool TCPConsole::run_queue() | ||||
| { | ||||
|     auto now = std::chrono::steady_clock::now(); | ||||
|     try { | ||||
|         // TODO: Add more resets and initializations after previous run (reset() method?..)
 | ||||
|         set_deadline_in(m_connect_timeout); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Vojtech Bubnik
						Vojtech Bubnik