diff options
| author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> | 2018-06-18 19:48:07 +0000 |
|---|---|---|
| committer | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> | 2018-06-18 19:48:07 +0000 |
| commit | fcf93adf1e766fbc69b05e598ee0aeb9b36b1c70 (patch) | |
| tree | 724178e38d88307e7b4129479006dc2ec122c410 /src/livarot/Path.cpp | |
| parent | Run clang-tidy’s modernize-use-noexcept pass. (diff) | |
| download | inkscape-fcf93adf1e766fbc69b05e598ee0aeb9b36b1c70.tar.gz inkscape-fcf93adf1e766fbc69b05e598ee0aeb9b36b1c70.zip | |
Run clang-tidy’s modernize-use-emplace pass.
This reduces the boilerplate required to add a new element to a
container.
Diffstat (limited to 'src/livarot/Path.cpp')
| -rw-r--r-- | src/livarot/Path.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/livarot/Path.cpp b/src/livarot/Path.cpp index 5fa418968..a43bc3769 100644 --- a/src/livarot/Path.cpp +++ b/src/livarot/Path.cpp @@ -416,7 +416,7 @@ int Path::AddPoint(Geom::Point const &iPt, bool mvto) } int const n = pts.size(); - pts.push_back(path_lineto(mvto ? polyline_moveto : polyline_lineto, iPt)); + pts.emplace_back(mvto ? polyline_moveto : polyline_lineto, iPt); return n; } @@ -444,7 +444,7 @@ int Path::AddPoint(Geom::Point const &iPt, int ip, double it, bool mvto) } int const n = pts.size(); - pts.push_back(path_lineto(mvto ? polyline_moveto : polyline_lineto, iPt, ip, it)); + pts.emplace_back(mvto ? polyline_moveto : polyline_lineto, iPt, ip, it); return n; } @@ -459,7 +459,7 @@ int Path::AddForcedPoint(Geom::Point const &iPt) } int const n = pts.size(); - pts.push_back(path_lineto(polyline_forced, pts[n - 1].p)); + pts.emplace_back(polyline_forced, pts[n - 1].p); return n; } @@ -476,7 +476,7 @@ int Path::AddForcedPoint(Geom::Point const &iPt, int /*ip*/, double /*it*/) } int const n = pts.size(); - pts.push_back(path_lineto(polyline_forced, pts[n - 1].p, pts[n - 1].piece, pts[n - 1].t)); + pts.emplace_back(polyline_forced, pts[n - 1].p, pts[n - 1].piece, pts[n - 1].t); return n; } |
