From fcf93adf1e766fbc69b05e598ee0aeb9b36b1c70 Mon Sep 17 00:00:00 2001 From: Emmanuel Gil Peyrot Date: Mon, 18 Jun 2018 21:48:07 +0200 Subject: =?UTF-8?q?Run=20clang-tidy=E2=80=99s=20modernize-use-emplace=20pa?= =?UTF-8?q?ss.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reduces the boilerplate required to add a new element to a container. --- src/seltrans.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/seltrans.cpp') 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 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(); } -- cgit v1.2.3