Apply some more modernize-use-emplace
This commit is contained in:
@@ -399,7 +399,7 @@ void MergeWindowContours (const std::vector<IfcVector2>& a,
|
||||
ClipperLib::Polygon clip;
|
||||
|
||||
for(const IfcVector2& pip : a) {
|
||||
clip.push_back(ClipperLib::IntPoint( to_int64(pip.x), to_int64(pip.y) ));
|
||||
clip.emplace_back(to_int64(pip.x), to_int64(pip.y));
|
||||
}
|
||||
|
||||
if (ClipperLib::Orientation(clip)) {
|
||||
@@ -410,7 +410,7 @@ void MergeWindowContours (const std::vector<IfcVector2>& a,
|
||||
clip.clear();
|
||||
|
||||
for(const IfcVector2& pip : b) {
|
||||
clip.push_back(ClipperLib::IntPoint( to_int64(pip.x), to_int64(pip.y) ));
|
||||
clip.emplace_back(to_int64(pip.x), to_int64(pip.y));
|
||||
}
|
||||
|
||||
if (ClipperLib::Orientation(clip)) {
|
||||
@@ -433,7 +433,7 @@ void MakeDisjunctWindowContours (const std::vector<IfcVector2>& a,
|
||||
ClipperLib::Polygon clip;
|
||||
|
||||
for(const IfcVector2& pip : a) {
|
||||
clip.push_back(ClipperLib::IntPoint( to_int64(pip.x), to_int64(pip.y) ));
|
||||
clip.emplace_back(to_int64(pip.x), to_int64(pip.y));
|
||||
}
|
||||
|
||||
if (ClipperLib::Orientation(clip)) {
|
||||
@@ -444,7 +444,7 @@ void MakeDisjunctWindowContours (const std::vector<IfcVector2>& a,
|
||||
clip.clear();
|
||||
|
||||
for(const IfcVector2& pip : b) {
|
||||
clip.push_back(ClipperLib::IntPoint( to_int64(pip.x), to_int64(pip.y) ));
|
||||
clip.emplace_back(to_int64(pip.x), to_int64(pip.y));
|
||||
}
|
||||
|
||||
if (ClipperLib::Orientation(clip)) {
|
||||
@@ -466,7 +466,7 @@ void CleanupWindowContour(ProjectedWindowContour& window)
|
||||
ClipperLib::ExPolygons clipped;
|
||||
|
||||
for(const IfcVector2& pip : contour) {
|
||||
subject.push_back(ClipperLib::IntPoint( to_int64(pip.x), to_int64(pip.y) ));
|
||||
subject.emplace_back(to_int64(pip.x), to_int64(pip.y));
|
||||
}
|
||||
|
||||
clipper.AddPolygon(subject,ClipperLib::ptSubject);
|
||||
@@ -524,7 +524,7 @@ void CleanupOuterContour(const std::vector<IfcVector2>& contour_flat, TempMesh&
|
||||
ClipperLib::Polygon clip;
|
||||
clip.reserve(contour_flat.size());
|
||||
for(const IfcVector2& pip : contour_flat) {
|
||||
clip.push_back(ClipperLib::IntPoint( to_int64(pip.x), to_int64(pip.y) ));
|
||||
clip.emplace_back(to_int64(pip.x), to_int64(pip.y));
|
||||
}
|
||||
|
||||
if (!ClipperLib::Orientation(clip)) {
|
||||
@@ -544,7 +544,7 @@ void CleanupOuterContour(const std::vector<IfcVector2>& contour_flat, TempMesh&
|
||||
continue;
|
||||
}
|
||||
}
|
||||
subject.push_back(ClipperLib::IntPoint( to_int64(pip.x), to_int64(pip.y) ));
|
||||
subject.emplace_back(to_int64(pip.x), to_int64(pip.y));
|
||||
if (--countdown == 0) {
|
||||
if (!ClipperLib::Orientation(subject)) {
|
||||
std::reverse(subject.begin(), subject.end());
|
||||
@@ -1378,12 +1378,12 @@ bool GenerateOpenings(std::vector<TempOpening>& openings,
|
||||
|
||||
if(!temp_contour.empty()) {
|
||||
if (generate_connection_geometry) {
|
||||
contours_to_openings.push_back(std::vector<TempOpening*>(
|
||||
joined_openings.begin(),
|
||||
joined_openings.end()));
|
||||
contours_to_openings.emplace_back(
|
||||
joined_openings.begin(),
|
||||
joined_openings.end());
|
||||
}
|
||||
|
||||
contours.push_back(ProjectedWindowContour(temp_contour, bb, is_rectangle));
|
||||
contours.emplace_back(temp_contour, bb, is_rectangle);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1791,7 +1791,7 @@ bool TryAddOpenings_Poly2Tri(const std::vector<TempOpening>& openings,
|
||||
pip.x = (pip.x - vmin.x) / vmax.x;
|
||||
pip.y = (pip.y - vmin.y) / vmax.y;
|
||||
|
||||
hole.push_back(ClipperLib::IntPoint(to_int64(pip.x),to_int64(pip.y)));
|
||||
hole.emplace_back(to_int64(pip.x), to_int64(pip.y));
|
||||
}
|
||||
|
||||
if(!ClipperLib::Orientation(hole)) {
|
||||
@@ -1833,7 +1833,7 @@ bool TryAddOpenings_Poly2Tri(const std::vector<TempOpening>& openings,
|
||||
pip.x = (pip.x - vmin.x) / vmax.x;
|
||||
pip.y = (pip.y - vmin.y) / vmax.y;
|
||||
|
||||
poly.push_back(ClipperLib::IntPoint( to_int64(pip.x), to_int64(pip.y) ));
|
||||
poly.emplace_back(to_int64(pip.x), to_int64(pip.y));
|
||||
}
|
||||
|
||||
if (ClipperLib::Orientation(poly)) {
|
||||
|
||||
Reference in New Issue
Block a user