diff options
Diffstat (limited to 'src/helper')
| -rw-r--r-- | src/helper/geom-pathstroke.cpp | 12 | ||||
| -rw-r--r-- | src/helper/geom.cpp | 28 |
2 files changed, 20 insertions, 20 deletions
diff --git a/src/helper/geom-pathstroke.cpp b/src/helper/geom-pathstroke.cpp index b9cc1a38f..23d133e08 100644 --- a/src/helper/geom-pathstroke.cpp +++ b/src/helper/geom-pathstroke.cpp @@ -444,13 +444,13 @@ void extrapolate_join_internal(join_data jd, int alternative) if( circle2.contains( startPt ) && !circle1.contains( endPt ) ) { // std::cout << "Expand circle1" << std::endl; p = expand_circle( circle1, circle2, startPt, tang1 ); - points.push_back( ShapeIntersection( 0, 0, p) ); - points.push_back( ShapeIntersection( 0, 0, p) ); + points.emplace_back( 0, 0, p ); + points.emplace_back( 0, 0, p ); } else if( circle1.contains( endPt ) && !circle2.contains( startPt ) ) { // std::cout << "Expand circle2" << std::endl; p = expand_circle( circle2, circle1, endPt, tang2 ); - points.push_back( ShapeIntersection( 0, 0, p) ); - points.push_back( ShapeIntersection( 0, 0, p) ); + points.emplace_back( 0, 0, p ); + points.emplace_back( 0, 0, p ); } else { // std::cout << "Either both points inside or both outside" << std::endl; return( miter_clip_join(jd) ); @@ -470,8 +470,8 @@ void extrapolate_join_internal(join_data jd, int alternative) ( circle1.contains( endPt ) && !circle2.contains( startPt ) ) ) { Geom::Point apex = adjust_circles( circle1, circle2, startPt, endPt, tang1, tang2 ); - points.push_back( ShapeIntersection( 0, 0, apex) ); - points.push_back( ShapeIntersection( 0, 0, apex) ); + points.emplace_back( 0, 0, apex ); + points.emplace_back( 0, 0, apex ); } else { // std::cout << "Either both points inside or both outside" << std::endl; return( miter_clip_join(jd) ); diff --git a/src/helper/geom.cpp b/src/helper/geom.cpp index e83fb42f2..253188f1d 100644 --- a/src/helper/geom.cpp +++ b/src/helper/geom.cpp @@ -707,7 +707,7 @@ recursive_bezier4(const double x1, const double y1, { if(d2 < m_distance_tolerance_square) { - m_points.push_back(Geom::Point(x2, y2)); + m_points.emplace_back(x2, y2); return; } } @@ -715,7 +715,7 @@ recursive_bezier4(const double x1, const double y1, { if(d3 < m_distance_tolerance_square) { - m_points.push_back(Geom::Point(x3, y3)); + m_points.emplace_back(x3, y3); return; } } @@ -728,7 +728,7 @@ recursive_bezier4(const double x1, const double y1, { if(m_angle_tolerance < curve_angle_tolerance_epsilon) { - m_points.push_back(Geom::Point(x23, y23)); + m_points.emplace_back(x23, y23); return; } @@ -739,8 +739,8 @@ recursive_bezier4(const double x1, const double y1, if(da1 < m_angle_tolerance) { - m_points.push_back(Geom::Point(x2, y2)); - m_points.push_back(Geom::Point(x3, y3)); + m_points.emplace_back(x2, y2); + m_points.emplace_back(x3, y3); return; } @@ -748,7 +748,7 @@ recursive_bezier4(const double x1, const double y1, { if(da1 > m_cusp_limit) { - m_points.push_back(Geom::Point(x3, y3)); + m_points.emplace_back(x3, y3); return; } } @@ -762,7 +762,7 @@ recursive_bezier4(const double x1, const double y1, { if(m_angle_tolerance < curve_angle_tolerance_epsilon) { - m_points.push_back(Geom::Point(x23, y23)); + m_points.emplace_back(x23, y23); return; } @@ -773,8 +773,8 @@ recursive_bezier4(const double x1, const double y1, if(da1 < m_angle_tolerance) { - m_points.push_back(Geom::Point(x2, y2)); - m_points.push_back(Geom::Point(x3, y3)); + m_points.emplace_back(x2, y2); + m_points.emplace_back(x3, y3); return; } @@ -782,7 +782,7 @@ recursive_bezier4(const double x1, const double y1, { if(da1 > m_cusp_limit) { - m_points.push_back(Geom::Point(x2, y2)); + m_points.emplace_back(x2, y2); return; } } @@ -799,7 +799,7 @@ recursive_bezier4(const double x1, const double y1, //---------------------- if(m_angle_tolerance < curve_angle_tolerance_epsilon) { - m_points.push_back(Geom::Point(x23, y23)); + m_points.emplace_back(x23, y23); return; } @@ -815,7 +815,7 @@ recursive_bezier4(const double x1, const double y1, { // Finally we can stop the recursion //---------------------- - m_points.push_back(Geom::Point(x23, y23)); + m_points.emplace_back(x23, y23); return; } @@ -823,13 +823,13 @@ recursive_bezier4(const double x1, const double y1, { if(da1 > m_cusp_limit) { - m_points.push_back(Geom::Point(x2, y2)); + m_points.emplace_back(x2, y2); return; } if(da2 > m_cusp_limit) { - m_points.push_back(Geom::Point(x3, y3)); + m_points.emplace_back(x3, y3); return; } } |
