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/seltrans.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/seltrans.cpp')
| -rw-r--r-- | src/seltrans.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/seltrans.cpp b/src/seltrans.cpp index 5c7482530..837f0da0e 100644 --- a/src/seltrans.cpp +++ b/src/seltrans.cpp @@ -1298,8 +1298,8 @@ gboolean Inkscape::SelTrans::centerRequest(Geom::Point &pt, guint state) if (state & GDK_CONTROL_MASK) { // with Ctrl, constrain to axes std::vector<Inkscape::Snapper::SnapConstraint> constraints; - constraints.push_back(Inkscape::Snapper::SnapConstraint(_point, Geom::Point(1, 0))); - constraints.push_back(Inkscape::Snapper::SnapConstraint(_point, Geom::Point(0, 1))); + constraints.emplace_back(_point, Geom::Point(1, 0)); + constraints.emplace_back(_point, Geom::Point(0, 1)); Inkscape::SnappedPoint sp = m.multipleConstrainedSnaps(Inkscape::SnapCandidatePoint(pt, Inkscape::SNAPSOURCE_ROTATION_CENTER), constraints, state & GDK_SHIFT_MASK); pt = sp.getPoint(); } |
