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/object | |
| 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/object')
| -rw-r--r-- | src/object/box3d.cpp | 4 | ||||
| -rw-r--r-- | src/object/sp-ellipse.cpp | 10 | ||||
| -rw-r--r-- | src/object/sp-flowtext.cpp | 2 | ||||
| -rw-r--r-- | src/object/sp-guide.cpp | 8 | ||||
| -rw-r--r-- | src/object/sp-image.cpp | 8 | ||||
| -rw-r--r-- | src/object/sp-item-update-cns.cpp | 2 | ||||
| -rw-r--r-- | src/object/sp-item.cpp | 12 | ||||
| -rw-r--r-- | src/object/sp-path.cpp | 2 | ||||
| -rw-r--r-- | src/object/sp-rect.cpp | 26 | ||||
| -rw-r--r-- | src/object/sp-shape.cpp | 12 | ||||
| -rw-r--r-- | src/object/sp-spiral.cpp | 2 | ||||
| -rw-r--r-- | src/object/sp-star.cpp | 2 | ||||
| -rw-r--r-- | src/object/sp-text.cpp | 2 |
13 files changed, 46 insertions, 46 deletions
diff --git a/src/object/box3d.cpp b/src/object/box3d.cpp index 7b5e44f65..df95f4f84 100644 --- a/src/object/box3d.cpp +++ b/src/object/box3d.cpp @@ -1311,8 +1311,8 @@ gchar *SPBox3D::description() const { static inline void box3d_push_back_corner_pair(SPBox3D const *box, std::list<std::pair<Geom::Point, Geom::Point> > &pts, int c1, int c2) { - pts.push_back(std::make_pair(box3d_get_corner_screen(box, c1, false), - box3d_get_corner_screen(box, c2, false))); + pts.emplace_back(box3d_get_corner_screen(box, c1, false), + box3d_get_corner_screen(box, c2, false)); } void SPBox3D::convert_to_guides() const { diff --git a/src/object/sp-ellipse.cpp b/src/object/sp-ellipse.cpp index 7856429e3..97ad7f74c 100644 --- a/src/object/sp-ellipse.cpp +++ b/src/object/sp-ellipse.cpp @@ -577,7 +577,7 @@ void SPGenericEllipse::snappoints(std::vector<Inkscape::SnapCandidatePoint> &p, for (double angle = 0; angle < SP_2PI; angle += M_PI_2) { if (Geom::AngleInterval(this->start, this->end, true).contains(angle)) { Geom::Point pt = this->getPointAtAngle(angle) * i2dt; - p.push_back(Inkscape::SnapCandidatePoint(pt, Inkscape::SNAPSOURCE_ELLIPSE_QUADRANT_POINT, Inkscape::SNAPTARGET_ELLIPSE_QUADRANT_POINT)); + p.emplace_back(pt, Inkscape::SNAPSOURCE_ELLIPSE_QUADRANT_POINT, Inkscape::SNAPTARGET_ELLIPSE_QUADRANT_POINT); } } } @@ -592,12 +592,12 @@ void SPGenericEllipse::snappoints(std::vector<Inkscape::SnapCandidatePoint> &p, if (snapprefs->isTargetSnappable(Inkscape::SNAPTARGET_NODE_CUSP) && slice && this->arc_type == SP_GENERIC_ELLIPSE_ARC_TYPE_SLICE) { Geom::Point pt = Geom::Point(cx, cy) * i2dt; - p.push_back(Inkscape::SnapCandidatePoint(pt, Inkscape::SNAPSOURCE_NODE_CUSP, Inkscape::SNAPTARGET_NODE_CUSP)); + p.emplace_back(pt, Inkscape::SNAPSOURCE_NODE_CUSP, Inkscape::SNAPTARGET_NODE_CUSP); } if (snapprefs->isTargetSnappable(Inkscape::SNAPTARGET_OBJECT_MIDPOINT)) { Geom::Point pt = Geom::Point(cx, cy) * i2dt; - p.push_back(Inkscape::SnapCandidatePoint(pt, Inkscape::SNAPSOURCE_OBJECT_MIDPOINT, Inkscape::SNAPTARGET_OBJECT_MIDPOINT)); + p.emplace_back(pt, Inkscape::SNAPSOURCE_OBJECT_MIDPOINT, Inkscape::SNAPTARGET_OBJECT_MIDPOINT); } // And if we have a slice, also snap to the endpoints @@ -605,13 +605,13 @@ void SPGenericEllipse::snappoints(std::vector<Inkscape::SnapCandidatePoint> &p, // Add the start point, if it's not coincident with a quadrant point if (!Geom::are_near(std::fmod(this->start, M_PI_2), 0)) { Geom::Point pt = this->getPointAtAngle(this->start) * i2dt; - p.push_back(Inkscape::SnapCandidatePoint(pt, Inkscape::SNAPSOURCE_NODE_CUSP, Inkscape::SNAPTARGET_NODE_CUSP)); + p.emplace_back(pt, Inkscape::SNAPSOURCE_NODE_CUSP, Inkscape::SNAPTARGET_NODE_CUSP); } // Add the end point, if it's not coincident with a quadrant point if (!Geom::are_near(std::fmod(this->end, M_PI_2), 0)) { Geom::Point pt = this->getPointAtAngle(this->end) * i2dt; - p.push_back(Inkscape::SnapCandidatePoint(pt, Inkscape::SNAPSOURCE_NODE_CUSP, Inkscape::SNAPTARGET_NODE_CUSP)); + p.emplace_back(pt, Inkscape::SNAPSOURCE_NODE_CUSP, Inkscape::SNAPTARGET_NODE_CUSP); } } } diff --git a/src/object/sp-flowtext.cpp b/src/object/sp-flowtext.cpp index 334282103..c0e23ee97 100644 --- a/src/object/sp-flowtext.cpp +++ b/src/object/sp-flowtext.cpp @@ -294,7 +294,7 @@ void SPFlowtext::snappoints(std::vector<Inkscape::SnapCandidatePoint> &p, Inksca boost::optional<Geom::Point> pt = layout->baselineAnchorPoint(); if (pt) { - p.push_back(Inkscape::SnapCandidatePoint((*pt) * this->i2dt_affine(), Inkscape::SNAPSOURCE_TEXT_ANCHOR, Inkscape::SNAPTARGET_TEXT_ANCHOR)); + p.emplace_back((*pt) * this->i2dt_affine(), Inkscape::SNAPSOURCE_TEXT_ANCHOR, Inkscape::SNAPTARGET_TEXT_ANCHOR); } } } diff --git a/src/object/sp-guide.cpp b/src/object/sp-guide.cpp index de15c7bcf..0b8558230 100644 --- a/src/object/sp-guide.cpp +++ b/src/object/sp-guide.cpp @@ -250,10 +250,10 @@ void sp_guide_create_guides_around_page(SPDesktop *dt) Geom::Point B(C[Geom::X], 0); Geom::Point D(0, C[Geom::Y]); - pts.push_back(std::pair<Geom::Point, Geom::Point>(A, B)); - pts.push_back(std::pair<Geom::Point, Geom::Point>(B, C)); - pts.push_back(std::pair<Geom::Point, Geom::Point>(C, D)); - pts.push_back(std::pair<Geom::Point, Geom::Point>(D, A)); + pts.emplace_back(A, B); + pts.emplace_back(B, C); + pts.emplace_back(C, D); + pts.emplace_back(D, A); sp_guide_pt_pairs_to_guides(doc, pts); diff --git a/src/object/sp-image.cpp b/src/object/sp-image.cpp index a1efef51d..cdbe0ef4a 100644 --- a/src/object/sp-image.cpp +++ b/src/object/sp-image.cpp @@ -659,10 +659,10 @@ void SPImage::snappoints(std::vector<Inkscape::SnapCandidatePoint> &p, Inkscape: Geom::Affine const i2d (this->i2dt_affine ()); - p.push_back(Inkscape::SnapCandidatePoint(Geom::Point(x0, y0) * i2d, Inkscape::SNAPSOURCE_IMG_CORNER, Inkscape::SNAPTARGET_IMG_CORNER)); - p.push_back(Inkscape::SnapCandidatePoint(Geom::Point(x0, y1) * i2d, Inkscape::SNAPSOURCE_IMG_CORNER, Inkscape::SNAPTARGET_IMG_CORNER)); - p.push_back(Inkscape::SnapCandidatePoint(Geom::Point(x1, y1) * i2d, Inkscape::SNAPSOURCE_IMG_CORNER, Inkscape::SNAPTARGET_IMG_CORNER)); - p.push_back(Inkscape::SnapCandidatePoint(Geom::Point(x1, y0) * i2d, Inkscape::SNAPSOURCE_IMG_CORNER, Inkscape::SNAPTARGET_IMG_CORNER)); + p.emplace_back(Geom::Point(x0, y0) * i2d, Inkscape::SNAPSOURCE_IMG_CORNER, Inkscape::SNAPTARGET_IMG_CORNER); + p.emplace_back(Geom::Point(x0, y1) * i2d, Inkscape::SNAPSOURCE_IMG_CORNER, Inkscape::SNAPTARGET_IMG_CORNER); + p.emplace_back(Geom::Point(x1, y1) * i2d, Inkscape::SNAPSOURCE_IMG_CORNER, Inkscape::SNAPTARGET_IMG_CORNER); + p.emplace_back(Geom::Point(x1, y0) * i2d, Inkscape::SNAPSOURCE_IMG_CORNER, Inkscape::SNAPTARGET_IMG_CORNER); } } } diff --git a/src/object/sp-item-update-cns.cpp b/src/object/sp-item-update-cns.cpp index cae95badd..a7f7958c3 100644 --- a/src/object/sp-item-update-cns.cpp +++ b/src/object/sp-item-update-cns.cpp @@ -29,7 +29,7 @@ void sp_item_update_cns(SPItem &item, SPDesktop const &desktop) == item.constraints.end() ) { item.constraints.push_back(cn); - cn.g->attached_items.push_back(SPGuideAttachment(&item, cn.snappoint_ix)); + cn.g->attached_items.emplace_back(&item, cn.snappoint_ix); } } } diff --git a/src/object/sp-item.cpp b/src/object/sp-item.cpp index 59ea0a554..286886a1a 100644 --- a/src/object/sp-item.cpp +++ b/src/object/sp-item.cpp @@ -982,7 +982,7 @@ void SPItem::getSnappoints(std::vector<Inkscape::SnapCandidatePoint> &p, Inkscap // Get the snappoints at the item's center if (snapprefs != nullptr && snapprefs->isTargetSnappable(Inkscape::SNAPTARGET_ROTATION_CENTER)) { - p.push_back(Inkscape::SnapCandidatePoint(getCenter(), Inkscape::SNAPSOURCE_ROTATION_CENTER, Inkscape::SNAPTARGET_ROTATION_CENTER)); + p.emplace_back(getCenter(), Inkscape::SNAPSOURCE_ROTATION_CENTER, Inkscape::SNAPTARGET_ROTATION_CENTER); } // Get the snappoints of clipping paths and mask, if any @@ -1006,7 +1006,7 @@ void SPItem::getSnappoints(std::vector<Inkscape::SnapCandidatePoint> &p, Inkscap // All snappoints are in desktop coordinates, but the item's transformation is // in document coordinates. Hence the awkward construction below Geom::Point pt = desktop->dt2doc((*p_orig).getPoint()) * i2dt_affine(); - p.push_back(Inkscape::SnapCandidatePoint(pt, (*p_orig).getSourceType(), (*p_orig).getTargetType())); + p.emplace_back(pt, (*p_orig).getSourceType(), (*p_orig).getTargetType()); } } } @@ -1735,10 +1735,10 @@ void SPItem::convert_to_guides() const { Geom::Point B(A[Geom::X], C[Geom::Y]); Geom::Point D(C[Geom::X], A[Geom::Y]); - pts.push_back(std::make_pair(A, B)); - pts.push_back(std::make_pair(B, C)); - pts.push_back(std::make_pair(C, D)); - pts.push_back(std::make_pair(D, A)); + pts.emplace_back(A, B); + pts.emplace_back(B, C); + pts.emplace_back(C, D); + pts.emplace_back(D, A); sp_guide_pt_pairs_to_guides(document, pts); } diff --git a/src/object/sp-path.cpp b/src/object/sp-path.cpp index 44070b6a3..e2f6e6c99 100644 --- a/src/object/sp-path.cpp +++ b/src/object/sp-path.cpp @@ -101,7 +101,7 @@ void SPPath::convert_to_guides() const { // only add curves for straight line segments if( is_straight_curve(*cit) ) { - pts.push_back(std::make_pair(cit->initialPoint() * i2dt, cit->finalPoint() * i2dt)); + pts.emplace_back(cit->initialPoint() * i2dt, cit->finalPoint() * i2dt); } } } diff --git a/src/object/sp-rect.cpp b/src/object/sp-rect.cpp index e3c5bf450..0a3447f81 100644 --- a/src/object/sp-rect.cpp +++ b/src/object/sp-rect.cpp @@ -518,21 +518,21 @@ void SPRect::snappoints(std::vector<Inkscape::SnapCandidatePoint> &p, Inkscape:: Geom::Point p3 = Geom::Point(this->x.computed + this->width.computed, this->y.computed) * i2dt; if (snapprefs->isTargetSnappable(Inkscape::SNAPTARGET_RECT_CORNER)) { - p.push_back(Inkscape::SnapCandidatePoint(p0, Inkscape::SNAPSOURCE_RECT_CORNER, Inkscape::SNAPTARGET_RECT_CORNER)); - p.push_back(Inkscape::SnapCandidatePoint(p1, Inkscape::SNAPSOURCE_RECT_CORNER, Inkscape::SNAPTARGET_RECT_CORNER)); - p.push_back(Inkscape::SnapCandidatePoint(p2, Inkscape::SNAPSOURCE_RECT_CORNER, Inkscape::SNAPTARGET_RECT_CORNER)); - p.push_back(Inkscape::SnapCandidatePoint(p3, Inkscape::SNAPSOURCE_RECT_CORNER, Inkscape::SNAPTARGET_RECT_CORNER)); + p.emplace_back(p0, Inkscape::SNAPSOURCE_RECT_CORNER, Inkscape::SNAPTARGET_RECT_CORNER); + p.emplace_back(p1, Inkscape::SNAPSOURCE_RECT_CORNER, Inkscape::SNAPTARGET_RECT_CORNER); + p.emplace_back(p2, Inkscape::SNAPSOURCE_RECT_CORNER, Inkscape::SNAPTARGET_RECT_CORNER); + p.emplace_back(p3, Inkscape::SNAPSOURCE_RECT_CORNER, Inkscape::SNAPTARGET_RECT_CORNER); } if (snapprefs->isTargetSnappable(Inkscape::SNAPTARGET_LINE_MIDPOINT)) { - p.push_back(Inkscape::SnapCandidatePoint((p0 + p1)/2, Inkscape::SNAPSOURCE_LINE_MIDPOINT, Inkscape::SNAPTARGET_LINE_MIDPOINT)); - p.push_back(Inkscape::SnapCandidatePoint((p1 + p2)/2, Inkscape::SNAPSOURCE_LINE_MIDPOINT, Inkscape::SNAPTARGET_LINE_MIDPOINT)); - p.push_back(Inkscape::SnapCandidatePoint((p2 + p3)/2, Inkscape::SNAPSOURCE_LINE_MIDPOINT, Inkscape::SNAPTARGET_LINE_MIDPOINT)); - p.push_back(Inkscape::SnapCandidatePoint((p3 + p0)/2, Inkscape::SNAPSOURCE_LINE_MIDPOINT, Inkscape::SNAPTARGET_LINE_MIDPOINT)); + p.emplace_back((p0 + p1)/2, Inkscape::SNAPSOURCE_LINE_MIDPOINT, Inkscape::SNAPTARGET_LINE_MIDPOINT); + p.emplace_back((p1 + p2)/2, Inkscape::SNAPSOURCE_LINE_MIDPOINT, Inkscape::SNAPTARGET_LINE_MIDPOINT); + p.emplace_back((p2 + p3)/2, Inkscape::SNAPSOURCE_LINE_MIDPOINT, Inkscape::SNAPTARGET_LINE_MIDPOINT); + p.emplace_back((p3 + p0)/2, Inkscape::SNAPSOURCE_LINE_MIDPOINT, Inkscape::SNAPTARGET_LINE_MIDPOINT); } if (snapprefs->isTargetSnappable(Inkscape::SNAPTARGET_OBJECT_MIDPOINT)) { - p.push_back(Inkscape::SnapCandidatePoint((p0 + p2)/2, Inkscape::SNAPSOURCE_OBJECT_MIDPOINT, Inkscape::SNAPTARGET_OBJECT_MIDPOINT)); + p.emplace_back((p0 + p2)/2, Inkscape::SNAPSOURCE_OBJECT_MIDPOINT, Inkscape::SNAPTARGET_OBJECT_MIDPOINT); } } @@ -554,10 +554,10 @@ void SPRect::convert_to_guides() const { Geom::Point A3(Geom::Point(this->x.computed + this->width.computed, this->y.computed + this->height.computed) * i2dt); Geom::Point A4(Geom::Point(this->x.computed + this->width.computed, this->y.computed) * i2dt); - pts.push_back(std::make_pair(A1, A2)); - pts.push_back(std::make_pair(A2, A3)); - pts.push_back(std::make_pair(A3, A4)); - pts.push_back(std::make_pair(A4, A1)); + pts.emplace_back(A1, A2); + pts.emplace_back(A2, A3); + pts.emplace_back(A3, A4); + pts.emplace_back(A4, A1); sp_guide_pt_pairs_to_guides(this->document, pts); } diff --git a/src/object/sp-shape.cpp b/src/object/sp-shape.cpp index cb636c100..1f4572428 100644 --- a/src/object/sp-shape.cpp +++ b/src/object/sp-shape.cpp @@ -1132,14 +1132,14 @@ void SPShape::snappoints(std::vector<Inkscape::SnapCandidatePoint> &p, Inkscape: Geom::OptRect bbox = this->desktopVisualBounds(); if (bbox) { - p.push_back(Inkscape::SnapCandidatePoint(bbox->midpoint(), Inkscape::SNAPSOURCE_OBJECT_MIDPOINT, Inkscape::SNAPTARGET_OBJECT_MIDPOINT)); + p.emplace_back(bbox->midpoint(), Inkscape::SNAPSOURCE_OBJECT_MIDPOINT, Inkscape::SNAPTARGET_OBJECT_MIDPOINT); } } for(Geom::PathVector::const_iterator path_it = pathv.begin(); path_it != pathv.end(); ++path_it) { if (snapprefs->isTargetSnappable(Inkscape::SNAPTARGET_NODE_CUSP)) { // Add the first point of the path - p.push_back(Inkscape::SnapCandidatePoint(path_it->initialPoint() * i2dt, Inkscape::SNAPSOURCE_NODE_CUSP, Inkscape::SNAPTARGET_NODE_CUSP)); + p.emplace_back(path_it->initialPoint() * i2dt, Inkscape::SNAPSOURCE_NODE_CUSP, Inkscape::SNAPTARGET_NODE_CUSP); } Geom::Path::const_iterator curve_it1 = path_it->begin(); // incoming curve @@ -1150,7 +1150,7 @@ void SPShape::snappoints(std::vector<Inkscape::SnapCandidatePoint> &p, Inkscape: // For each path: consider midpoints of line segments for snapping if (snapprefs->isTargetSnappable(Inkscape::SNAPTARGET_LINE_MIDPOINT)) { if (Geom::LineSegment const* line_segment = dynamic_cast<Geom::LineSegment const*>(&(*curve_it1))) { - p.push_back(Inkscape::SnapCandidatePoint(Geom::middle_point(*line_segment) * i2dt, Inkscape::SNAPSOURCE_LINE_MIDPOINT, Inkscape::SNAPTARGET_LINE_MIDPOINT)); + p.emplace_back(Geom::middle_point(*line_segment) * i2dt, Inkscape::SNAPSOURCE_LINE_MIDPOINT, Inkscape::SNAPTARGET_LINE_MIDPOINT); } } @@ -1158,7 +1158,7 @@ void SPShape::snappoints(std::vector<Inkscape::SnapCandidatePoint> &p, Inkscape: if (snapprefs->isTargetSnappable(Inkscape::SNAPTARGET_NODE_CUSP) && !path_it->closed()) { // Add the last point of the path, but only for open paths // (for closed paths the first and last point will coincide) - p.push_back(Inkscape::SnapCandidatePoint((*curve_it1).finalPoint() * i2dt, Inkscape::SNAPSOURCE_NODE_CUSP, Inkscape::SNAPTARGET_NODE_CUSP)); + p.emplace_back((*curve_it1).finalPoint() * i2dt, Inkscape::SNAPSOURCE_NODE_CUSP, Inkscape::SNAPTARGET_NODE_CUSP); } } else { /* Test whether to add the node between curve_it1 and curve_it2. @@ -1189,7 +1189,7 @@ void SPShape::snappoints(std::vector<Inkscape::SnapCandidatePoint> &p, Inkscape: break; } - p.push_back(Inkscape::SnapCandidatePoint(curve_it1->finalPoint() * i2dt, sst, stt)); + p.emplace_back(curve_it1->finalPoint() * i2dt, sst, stt); } } @@ -1208,7 +1208,7 @@ void SPShape::snappoints(std::vector<Inkscape::SnapCandidatePoint> &p, Inkscape: if (!cs.empty()) { // There might be multiple intersections... for (Geom::Crossings::const_iterator i = cs.begin(); i != cs.end(); ++i) { Geom::Point p_ix = (*path_it).pointAt((*i).ta); - p.push_back(Inkscape::SnapCandidatePoint(p_ix * i2dt, Inkscape::SNAPSOURCE_PATH_INTERSECTION, Inkscape::SNAPTARGET_PATH_INTERSECTION)); + p.emplace_back(p_ix * i2dt, Inkscape::SNAPSOURCE_PATH_INTERSECTION, Inkscape::SNAPTARGET_PATH_INTERSECTION); } } } catch (Geom::RangeError &e) { diff --git a/src/object/sp-spiral.cpp b/src/object/sp-spiral.cpp index 442580888..e8109be0f 100644 --- a/src/object/sp-spiral.cpp +++ b/src/object/sp-spiral.cpp @@ -393,7 +393,7 @@ void SPSpiral::snappoints(std::vector<Inkscape::SnapCandidatePoint> &p, Inkscape if (snapprefs->isTargetSnappable(Inkscape::SNAPTARGET_OBJECT_MIDPOINT)) { Geom::Affine const i2dt (this->i2dt_affine ()); - p.push_back(Inkscape::SnapCandidatePoint(Geom::Point(this->cx, this->cy) * i2dt, Inkscape::SNAPSOURCE_OBJECT_MIDPOINT, Inkscape::SNAPTARGET_OBJECT_MIDPOINT)); + p.emplace_back(Geom::Point(this->cx, this->cy) * i2dt, Inkscape::SNAPSOURCE_OBJECT_MIDPOINT, Inkscape::SNAPTARGET_OBJECT_MIDPOINT); // This point is the start-point of the spiral, which is also returned when _snap_to_itemnode has been set // in the object snapper. In that case we will get a duplicate! } diff --git a/src/object/sp-star.cpp b/src/object/sp-star.cpp index 235fd32d8..dc8ce4d91 100644 --- a/src/object/sp-star.cpp +++ b/src/object/sp-star.cpp @@ -483,7 +483,7 @@ void SPStar::snappoints(std::vector<Inkscape::SnapCandidatePoint> &p, Inkscape:: if (snapprefs->isTargetSnappable(Inkscape::SNAPTARGET_OBJECT_MIDPOINT)) { Geom::Affine const i2dt (this->i2dt_affine ()); - p.push_back(Inkscape::SnapCandidatePoint(this->center * i2dt,Inkscape::SNAPSOURCE_OBJECT_MIDPOINT, Inkscape::SNAPTARGET_OBJECT_MIDPOINT)); + p.emplace_back(this->center * i2dt,Inkscape::SNAPSOURCE_OBJECT_MIDPOINT, Inkscape::SNAPTARGET_OBJECT_MIDPOINT); } } diff --git a/src/object/sp-text.cpp b/src/object/sp-text.cpp index 245330720..f801e8df0 100644 --- a/src/object/sp-text.cpp +++ b/src/object/sp-text.cpp @@ -356,7 +356,7 @@ void SPText::snappoints(std::vector<Inkscape::SnapCandidatePoint> &p, Inkscape:: boost::optional<Geom::Point> pt = layout->baselineAnchorPoint(); if (pt) { - p.push_back(Inkscape::SnapCandidatePoint((*pt) * this->i2dt_affine(), Inkscape::SNAPSOURCE_TEXT_ANCHOR, Inkscape::SNAPTARGET_TEXT_ANCHOR)); + p.emplace_back((*pt) * this->i2dt_affine(), Inkscape::SNAPSOURCE_TEXT_ANCHOR, Inkscape::SNAPTARGET_TEXT_ANCHOR); } } } |
