mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-10-27 10:41:15 -06:00
Fixing Clang warnings 1
This commit is contained in:
parent
cd1322ce3f
commit
0ff0444dcc
23 changed files with 90 additions and 88 deletions
|
|
@ -266,14 +266,14 @@ void AppConfig::save()
|
|||
else
|
||||
c << "# " << Slic3r::header_gcodeviewer_generated() << std::endl;
|
||||
// Make sure the "no" category is written first.
|
||||
for (const std::pair<std::string, std::string> &kvp : m_storage[""])
|
||||
for (const auto& kvp : m_storage[""])
|
||||
c << kvp.first << " = " << kvp.second << std::endl;
|
||||
// Write the other categories.
|
||||
for (const auto category : m_storage) {
|
||||
for (const auto& category : m_storage) {
|
||||
if (category.first.empty())
|
||||
continue;
|
||||
c << std::endl << "[" << category.first << "]" << std::endl;
|
||||
for (const std::pair<std::string, std::string> &kvp : category.second)
|
||||
for (const auto& kvp : category.second)
|
||||
c << kvp.first << " = " << kvp.second << std::endl;
|
||||
}
|
||||
// Write vendor sections
|
||||
|
|
|
|||
|
|
@ -1344,7 +1344,7 @@ public:
|
|||
|
||||
static bool has(T value)
|
||||
{
|
||||
for (const std::pair<std::string, int> &kvp : ConfigOptionEnum<T>::get_enum_values())
|
||||
for (const auto &kvp : ConfigOptionEnum<T>::get_enum_values())
|
||||
if (kvp.second == value)
|
||||
return true;
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -405,7 +405,7 @@ public:
|
|||
|
||||
WipeTowerWriter& append(const std::string& text) { m_gcode += text; return *this; }
|
||||
|
||||
std::vector<Vec2f> wipe_path() const
|
||||
const std::vector<Vec2f>& wipe_path() const
|
||||
{
|
||||
return m_wipe_path;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -290,7 +290,7 @@ void LayerRegion::process_external_surfaces(const Layer *lower_layer, const Poly
|
|||
surfaces_append(bottom, union_ex(grown, true), bridges[idx_last]);
|
||||
}
|
||||
|
||||
fill_boundaries = std::move(to_polygons(fill_boundaries_ex));
|
||||
fill_boundaries = to_polygons(fill_boundaries_ex);
|
||||
BOOST_LOG_TRIVIAL(trace) << "Processing external surface, detecting bridges - done";
|
||||
}
|
||||
|
||||
|
|
@ -327,7 +327,7 @@ void LayerRegion::process_external_surfaces(const Layer *lower_layer, const Poly
|
|||
surfaces_append(
|
||||
new_surfaces,
|
||||
// Don't use a safety offset as fill_boundaries were already united using the safety offset.
|
||||
std::move(intersection_ex(polys, fill_boundaries, false)),
|
||||
intersection_ex(polys, fill_boundaries, false),
|
||||
s1);
|
||||
}
|
||||
}
|
||||
|
|
@ -424,7 +424,7 @@ void LayerRegion::elephant_foot_compensation_step(const float elephant_foot_comp
|
|||
Polygons slices_polygons = to_polygons(slices_expolygons);
|
||||
Polygons tmp = intersection(slices_polygons, trimming_polygons, false);
|
||||
append(tmp, diff(slices_polygons, offset(offset_ex(slices_expolygons, -elephant_foot_compensation_perimeter_step), elephant_foot_compensation_perimeter_step)));
|
||||
this->slices.set(std::move(union_ex(tmp)), stInternal);
|
||||
this->slices.set(union_ex(tmp), stInternal);
|
||||
}
|
||||
|
||||
void LayerRegion::export_region_slices_to_svg(const char *path) const
|
||||
|
|
|
|||
|
|
@ -103,7 +103,7 @@ enum FacetEdgeType {
|
|||
class IntersectionReference
|
||||
{
|
||||
public:
|
||||
IntersectionReference() : point_id(-1), edge_id(-1) {};
|
||||
IntersectionReference() : point_id(-1), edge_id(-1) {}
|
||||
IntersectionReference(int point_id, int edge_id) : point_id(point_id), edge_id(edge_id) {}
|
||||
// Where is this intersection point located? On mesh vertex or mesh edge?
|
||||
// Only one of the following will be set, the other will remain set to -1.
|
||||
|
|
@ -116,7 +116,7 @@ public:
|
|||
class IntersectionPoint : public Point, public IntersectionReference
|
||||
{
|
||||
public:
|
||||
IntersectionPoint() {};
|
||||
IntersectionPoint() {}
|
||||
IntersectionPoint(int point_id, int edge_id, const Point &pt) : IntersectionReference(point_id, edge_id), Point(pt) {}
|
||||
IntersectionPoint(const IntersectionReference &ir, const Point &pt) : IntersectionReference(ir), Point(pt) {}
|
||||
// Inherits coord_t x, y
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue