Fixing clang compiler warnings

This commit is contained in:
Vojtech Bubnik 2021-11-30 10:50:18 +01:00
parent f72d83993e
commit 5fd279cbc8
18 changed files with 27 additions and 23 deletions

View file

@ -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.

View file

@ -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 */

View file

@ -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;

View file

@ -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