From: dvlierop2 Date: Fri, 11 Apr 2008 08:03:13 +0000 (+0000) Subject: Refactor snapping mechanisms: in seltrans.cpp, a GSList was converted to a std::list... X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=848e75a186ca20a05f2e956e7f345ded9ece9f04;p=inkscape.git Refactor snapping mechanisms: in seltrans.cpp, a GSList was converted to a std::list in four different places. Now this is handled in only one place --- diff --git a/src/line-snapper.cpp b/src/line-snapper.cpp index 219bc7482..b9974c2c0 100644 --- a/src/line-snapper.cpp +++ b/src/line-snapper.cpp @@ -28,7 +28,7 @@ void Inkscape::LineSnapper::_doFreeSnap(SnappedConstraints &sc, NR::Point const &p, bool const &f, std::vector &points_to_snap, - std::list const &it, + std::vector const &it, std::vector *unselected_nodes) const { /* Get the lines that we will try to snap to */ @@ -59,7 +59,7 @@ void Inkscape::LineSnapper::_doConstrainedSnap(SnappedConstraints &sc, bool const &/*f*/, std::vector &/*points_to_snap*/, ConstraintLine const &c, - std::list const &/*it*/) const + std::vector const &/*it*/) const { /* Get the lines that we will try to snap to */ diff --git a/src/line-snapper.h b/src/line-snapper.h index c1c7da39a..39df82057 100644 --- a/src/line-snapper.h +++ b/src/line-snapper.h @@ -32,7 +32,7 @@ private: NR::Point const &p, bool const &first_point, std::vector &points_to_snap, - std::list const &it, + std::vector const &it, std::vector *unselected_nodes) const; void _doConstrainedSnap(SnappedConstraints &sc, @@ -41,7 +41,7 @@ private: bool const &first_point, std::vector &points_to_snap, ConstraintLine const &c, - std::list const &it) const; + std::vector const &it) const; /** * \param p Point that we are trying to snap. diff --git a/src/object-snapper.cpp b/src/object-snapper.cpp index 9d4745bfe..8c728cd97 100644 --- a/src/object-snapper.cpp +++ b/src/object-snapper.cpp @@ -65,7 +65,7 @@ Inkscape::ObjectSnapper::~ObjectSnapper() */ void Inkscape::ObjectSnapper::_findCandidates(SPObject* r, - std::list const &it, + std::vector const &it, bool const &first_point, std::vector &points_to_snap, DimensionToSnap const snap_dim) const @@ -100,7 +100,7 @@ void Inkscape::ObjectSnapper::_findCandidates(SPObject* r, if (SP_IS_ITEM(o) && !SP_ITEM(o)->isLocked() && !desktop->itemIsHidden(SP_ITEM(o))) { /* See if this item is on the ignore list */ - std::list::const_iterator i = it.begin(); + std::vector::const_iterator i = it.begin(); while (i != it.end() && *i != o) { i++; } @@ -552,7 +552,7 @@ void Inkscape::ObjectSnapper::_doFreeSnap(SnappedConstraints &sc, NR::Point const &p, bool const &first_point, std::vector &points_to_snap, - std::list const &it, + std::vector const &it, std::vector *unselected_nodes) const { if ( NULL == _named_view ) { @@ -594,7 +594,7 @@ void Inkscape::ObjectSnapper::_doConstrainedSnap( SnappedConstraints &sc, bool const &first_point, std::vector &points_to_snap, ConstraintLine const &c, - std::list const &it) const + std::vector const &it) const { if ( NULL == _named_view ) { return; @@ -631,7 +631,7 @@ void Inkscape::ObjectSnapper::guideSnap(SnappedConstraints &sc, /* Get a list of all the SPItems that we will try to snap to */ std::vector cand; - std::list const it; //just an empty list + std::vector const it; //just an empty list std::vector points_to_snap; points_to_snap.push_back(p); diff --git a/src/object-snapper.h b/src/object-snapper.h index 924c94e07..29f595424 100644 --- a/src/object-snapper.h +++ b/src/object-snapper.h @@ -111,7 +111,7 @@ private: NR::Point const &p, bool const &first_point, std::vector &points_to_snap, - std::list const &it, + std::vector const &it, std::vector *unselected_nodes) const; void _doConstrainedSnap(SnappedConstraints &sc, @@ -120,10 +120,10 @@ private: bool const &first_point, std::vector &points_to_snap, ConstraintLine const &c, - std::list const &it) const; + std::vector const &it) const; void _findCandidates(SPObject* r, - std::list const &it, + std::vector const &it, bool const &first_point, std::vector &points_to_snap, DimensionToSnap snap_dim) const; diff --git a/src/seltrans.cpp b/src/seltrans.cpp index d248d3152..154e828c4 100644 --- a/src/seltrans.cpp +++ b/src/seltrans.cpp @@ -205,10 +205,12 @@ Inkscape::SelTrans::~SelTrans() } for (unsigned i = 0; i < _items.size(); i++) { - sp_object_unref(SP_OBJECT(_items[i].first), NULL); + sp_object_unref(SP_OBJECT(_items[i]), NULL); } _items.clear(); + _items_const.clear(); + _items_affines.clear(); _items_centers.clear(); } @@ -263,9 +265,11 @@ void Inkscape::SelTrans::grab(NR::Point const &p, gdouble x, gdouble y, bool sho } for (GSList const *l = selection->itemList(); l; l = l->next) { - SPItem *it = (SPItem*)sp_object_ref(SP_OBJECT(l->data), NULL); - _items.push_back(std::pair(it, sp_item_i2d_affine(it))); - _items_centers.push_back(std::pair(it, it->getCenter())); // for content-dragging, we need to remember original centers + SPItem *it = (SPItem *)sp_object_ref(SP_OBJECT(l->data), NULL); + _items.push_back(it); + _items_const.push_back(it); + _items_affines.push_back(sp_item_i2d_affine(it)); + _items_centers.push_back(it->getCenter()); // for content-dragging, we need to remember original centers } _handle_x = x; @@ -366,8 +370,8 @@ void Inkscape::SelTrans::transform(NR::Matrix const &rel_affine, NR::Point const if (_show == SHOW_CONTENT) { // update the content for (unsigned i = 0; i < _items.size(); i++) { - SPItem &item = *_items[i].first; - NR::Matrix const &prev_transform = _items[i].second; + SPItem &item = *_items[i]; + NR::Matrix const &prev_transform = _items_affines[i]; sp_item_set_i2d_affine(&item, prev_transform * affine); } } else { @@ -398,7 +402,7 @@ void Inkscape::SelTrans::ungrab() _updateVolatileState(); for (unsigned i = 0; i < _items.size(); i++) { - sp_object_unref(SP_OBJECT(_items[i].first), NULL); + sp_object_unref(SP_OBJECT(_items[i]), NULL); } sp_canvas_item_hide(_norm); @@ -428,15 +432,17 @@ void Inkscape::SelTrans::ungrab() // the new bboxes). So we need to reset the centers from our saved array. if (_show != SHOW_OUTLINE && !_current_relative_affine.is_translation()) { for (unsigned i = 0; i < _items_centers.size(); i++) { - SPItem *currentItem = _items_centers[i].first; + SPItem *currentItem = _items[i]; if (currentItem->isCenterSet()) { // only if it's already set - currentItem->setCenter (_items_centers[i].second * _current_relative_affine); + currentItem->setCenter (_items_centers[i] * _current_relative_affine); SP_OBJECT(currentItem)->updateRepr(); } } } _items.clear(); + _items_const.clear(); + _items_affines.clear(); _items_centers.clear(); if (_current_relative_affine.is_translation()) { @@ -466,6 +472,8 @@ void Inkscape::SelTrans::ungrab() } _items.clear(); + _items_const.clear(); + _items_affines.clear(); _items_centers.clear(); _updateHandles(); } @@ -766,7 +774,7 @@ void Inkscape::SelTrans::handleNewEvent(SPKnot *knot, NR::Point *position, guint // in case items have been unhooked from the document, don't // try to continue processing events for them. for (unsigned int i = 0; i < _items.size(); i++) { - if (!SP_OBJECT_DOCUMENT(SP_OBJECT(_items[i].first)) ) { + if (!SP_OBJECT_DOCUMENT(SP_OBJECT(_items[i])) ) { return; } } @@ -909,14 +917,6 @@ gboolean Inkscape::SelTrans::scaleRequest(NR::Point &pt, guint state) // In all other cases we should try to snap now SnapManager const &m = _desktop->namedview->snap_manager; - /* Get a STL list of the selected items. - ** FIXME: this should probably be done by Inkscape::Selection. - */ - std::list it; - for (GSList const *i = _selection->itemList(); i != NULL; i = i->next) { - it.push_back(reinterpret_cast(i->data)); - } - Inkscape::SnappedPoint bb, sn; NR::Coord bd(NR_HUGE); NR::Coord sd(NR_HUGE); @@ -934,8 +934,8 @@ gboolean Inkscape::SelTrans::scaleRequest(NR::Point &pt, guint state) } // Snap along a suitable constraint vector from the origin. - bb = m.constrainedSnapScale(Snapper::SNAPPOINT_BBOX, _bbox_points, it, default_scale, _origin_for_bboxpoints); - sn = m.constrainedSnapScale(Snapper::SNAPPOINT_NODE, _snap_points, it, geom_scale, _origin_for_specpoints); + bb = m.constrainedSnapScale(Snapper::SNAPPOINT_BBOX, _bbox_points, _items_const, default_scale, _origin_for_bboxpoints); + sn = m.constrainedSnapScale(Snapper::SNAPPOINT_NODE, _snap_points, _items_const, geom_scale, _origin_for_specpoints); /* Choose the smaller difference in scale. Since s[X] == s[Y] we can ** just compare difference in s[X]. @@ -944,8 +944,8 @@ gboolean Inkscape::SelTrans::scaleRequest(NR::Point &pt, guint state) sd = sn.getSnapped() ? fabs(sn.getTransformation()[NR::X] - geom_scale[NR::X]) : NR_HUGE; } else { /* Scale aspect ratio is unlocked */ - bb = m.freeSnapScale(Snapper::SNAPPOINT_BBOX, _bbox_points, it, default_scale, _origin_for_bboxpoints); - sn = m.freeSnapScale(Snapper::SNAPPOINT_NODE, _snap_points, it, geom_scale, _origin_for_specpoints); + bb = m.freeSnapScale(Snapper::SNAPPOINT_BBOX, _bbox_points, _items_const, default_scale, _origin_for_bboxpoints); + sn = m.freeSnapScale(Snapper::SNAPPOINT_NODE, _snap_points, _items_const, geom_scale, _origin_for_specpoints); /* Pick the snap that puts us closest to the original scale */ bd = bb.getSnapped() ? fabs(NR::L2(bb.getTransformation()) - NR::L2(default_scale.point())) : NR_HUGE; @@ -1022,14 +1022,6 @@ gboolean Inkscape::SelTrans::stretchRequest(SPSelTransHandle const &handle, NR:: } else { // In all other cases we should try to snap now - /* Get a STL list of the selected items. - ** FIXME: this should probably be done by Inkscape::Selection. - */ - std::list it; - for (GSList const *i = _selection->itemList(); i != NULL; i = i->next) { - it.push_back(reinterpret_cast(i->data)); - } - SnapManager const &m = _desktop->namedview->snap_manager; Inkscape::SnappedPoint bb, sn; @@ -1039,8 +1031,8 @@ gboolean Inkscape::SelTrans::stretchRequest(SPSelTransHandle const &handle, NR:: bool symmetrical = state & GDK_CONTROL_MASK; - bb = m.constrainedSnapStretch(Snapper::SNAPPOINT_BBOX, _bbox_points, it, default_scale[axis], _origin_for_bboxpoints, axis, symmetrical); - sn = m.constrainedSnapStretch(Snapper::SNAPPOINT_NODE, _snap_points, it, geom_scale[axis], _origin_for_specpoints, axis, symmetrical); + bb = m.constrainedSnapStretch(Snapper::SNAPPOINT_BBOX, _bbox_points, _items_const, default_scale[axis], _origin_for_bboxpoints, axis, symmetrical); + sn = m.constrainedSnapStretch(Snapper::SNAPPOINT_NODE, _snap_points, _items_const, geom_scale[axis], _origin_for_specpoints, axis, symmetrical); if (bb.getSnapped()) { // We snapped the bbox (which is either visual or geometric) @@ -1149,20 +1141,12 @@ gboolean Inkscape::SelTrans::skewRequest(SPSelTransHandle const &handle, NR::Poi } else { // Snap to objects, grids, guides - /* Get a STL list of the selected items. - ** FIXME: this should probably be done by Inkscape::Selection. - */ - std::list it; - for (GSList const *i = _selection->itemList(); i != NULL; i = i->next) { - it.push_back(reinterpret_cast(i->data)); - } - SnapManager const &m = _desktop->namedview->snap_manager; //TODO: While skewing, scaling in the opposite direction by integer multiples is also allowed. This is not handled though by freeSnapSkew / _snapTransformed yet! //TODO: We need a constrainedSnapSkew instead of a freeSnapSkew - Inkscape::SnappedPoint bb = m.freeSnapSkew(Inkscape::Snapper::SNAPPOINT_BBOX, _bbox_points, it, skew[dim_a], _origin, dim_b); - Inkscape::SnappedPoint sn = m.freeSnapSkew(Inkscape::Snapper::SNAPPOINT_NODE, _snap_points, it, skew[dim_a], _origin, dim_b); + Inkscape::SnappedPoint bb = m.freeSnapSkew(Inkscape::Snapper::SNAPPOINT_BBOX, _bbox_points, _items_const, skew[dim_a], _origin, dim_b); + Inkscape::SnappedPoint sn = m.freeSnapSkew(Inkscape::Snapper::SNAPPOINT_NODE, _snap_points, _items_const, skew[dim_a], _origin, dim_b); if (bb.getSnapped() || sn.getSnapped()) { // We snapped something, so change the skew to reflect it @@ -1364,14 +1348,6 @@ void Inkscape::SelTrans::moveTo(NR::Point const &xy, guint state) /* The amount that we've moved by during this drag */ NR::Point dxy = xy - _point; - /* Get a STL list of the selected items. - ** FIXME: this should probably be done by Inkscape::Selection. - */ - std::list it; - for (GSList const *i = _selection->itemList(); i != NULL; i = i->next) { - it.push_back(reinterpret_cast(i->data)); - } - bool const alt = (state & GDK_MOD1_MASK); bool const control = (state & GDK_CONTROL_MASK); bool const shift = (state & GDK_SHIFT_MASK); @@ -1401,13 +1377,13 @@ void Inkscape::SelTrans::moveTo(NR::Point const &xy, guint state) for (unsigned int dim = 0; dim < 2; dim++) { s.push_back(m.constrainedSnapTranslation(Inkscape::Snapper::SNAPPOINT_BBOX, _bbox_points, - it, + _items_const, Inkscape::Snapper::ConstraintLine(component_vectors[dim]), dxy)); s.push_back(m.constrainedSnapTranslation(Inkscape::Snapper::SNAPPOINT_NODE, _snap_points, - it, + _items_const, Inkscape::Snapper::ConstraintLine(component_vectors[dim]), dxy)); } @@ -1421,9 +1397,9 @@ void Inkscape::SelTrans::moveTo(NR::Point const &xy, guint state) /* Snap to things with no constraint */ s.push_back(m.freeSnapTranslation(Inkscape::Snapper::SNAPPOINT_BBOX, - _bbox_points, it, dxy)); + _bbox_points, _items_const, dxy)); s.push_back(m.freeSnapTranslation(Inkscape::Snapper::SNAPPOINT_NODE, - _snap_points, it, dxy)); + _snap_points, _items_const, dxy)); /*g_get_current_time(&endtime); double elapsed = ((((double)endtime.tv_sec - starttime.tv_sec) * G_USEC_PER_SEC + (endtime.tv_usec - starttime.tv_usec))) / 1000.0; diff --git a/src/seltrans.h b/src/seltrans.h index 00d7fb1c4..d06e05276 100644 --- a/src/seltrans.h +++ b/src/seltrans.h @@ -110,8 +110,10 @@ private: SPDesktop *_desktop; - std::vector > _items; - std::vector > _items_centers; + std::vector _items; + std::vector _items_const; + std::vector _items_affines; + std::vector _items_centers; std::vector _snap_points; std::vector _bbox_points; diff --git a/src/snap.cpp b/src/snap.cpp index 76bda9282..2d23a7745 100644 --- a/src/snap.cpp +++ b/src/snap.cpp @@ -182,8 +182,10 @@ Inkscape::SnappedPoint SnapManager::freeSnap(Inkscape::Snapper::PointType t, NR::Maybe point_not_to_snap_to) const { - std::list lit; - lit.push_back(it); + std::vector lit; + if (it) { + lit.push_back(it); + } std::vector points_to_snap; points_to_snap.push_back(p); @@ -206,8 +208,10 @@ Inkscape::SnappedPoint SnapManager::freeSnap(Inkscape::Snapper::PointType t, std::vector *unselected_nodes) const { - std::list lit; - lit.push_back(it); + std::vector lit; + if (it) { + lit.push_back(it); + } std::vector points_to_snap; points_to_snap.push_back(p); @@ -232,7 +236,7 @@ Inkscape::SnappedPoint SnapManager::freeSnap(Inkscape::Snapper::PointType t, NR::Point const &p, bool const &first_point, std::vector &points_to_snap, - std::list const &it, + std::vector const &it, std::vector *unselected_nodes) const { if (!SomeSnapperMightSnap()) { @@ -266,8 +270,10 @@ Inkscape::SnappedPoint SnapManager::constrainedSnap(Inkscape::Snapper::PointType Inkscape::Snapper::ConstraintLine const &c, SPItem const *it) const { - std::list lit; - lit.push_back(it); + std::vector lit; + if (it) { + lit.push_back(it); + } std::vector points_to_snap; points_to_snap.push_back(p); @@ -295,7 +301,7 @@ Inkscape::SnappedPoint SnapManager::constrainedSnap(Inkscape::Snapper::PointType bool const &first_point, std::vector &points_to_snap, Inkscape::Snapper::ConstraintLine const &c, - std::list const &it) const + std::vector const &it) const { if (!SomeSnapperMightSnap()) { return Inkscape::SnappedPoint(p, NR_HUGE, 0, false); @@ -347,7 +353,7 @@ Inkscape::SnappedPoint SnapManager::guideSnap(NR::Point const &p, Inkscape::SnappedPoint SnapManager::_snapTransformed( Inkscape::Snapper::PointType type, std::vector const &points, - std::list const &ignore, + std::vector const &ignore, bool constrained, Inkscape::Snapper::ConstraintLine const &constraint, Transformation transformation_type, @@ -593,7 +599,7 @@ Inkscape::SnappedPoint SnapManager::_snapTransformed( Inkscape::SnappedPoint SnapManager::freeSnapTranslation(Inkscape::Snapper::PointType t, std::vector const &p, - std::list const &it, + std::vector const &it, NR::Point const &tr) const { return _snapTransformed(t, p, it, false, NR::Point(), TRANSLATION, tr, NR::Point(), NR::X, false); @@ -615,7 +621,7 @@ Inkscape::SnappedPoint SnapManager::freeSnapTranslation(Inkscape::Snapper::Point Inkscape::SnappedPoint SnapManager::constrainedSnapTranslation(Inkscape::Snapper::PointType t, std::vector const &p, - std::list const &it, + std::vector const &it, Inkscape::Snapper::ConstraintLine const &c, NR::Point const &tr) const { @@ -637,7 +643,7 @@ Inkscape::SnappedPoint SnapManager::constrainedSnapTranslation(Inkscape::Snapper Inkscape::SnappedPoint SnapManager::freeSnapScale(Inkscape::Snapper::PointType t, std::vector const &p, - std::list const &it, + std::vector const &it, NR::scale const &s, NR::Point const &o) const { @@ -660,7 +666,7 @@ Inkscape::SnappedPoint SnapManager::freeSnapScale(Inkscape::Snapper::PointType t Inkscape::SnappedPoint SnapManager::constrainedSnapScale(Inkscape::Snapper::PointType t, std::vector const &p, - std::list const &it, + std::vector const &it, NR::scale const &s, NR::Point const &o) const { @@ -685,7 +691,7 @@ Inkscape::SnappedPoint SnapManager::constrainedSnapScale(Inkscape::Snapper::Poin Inkscape::SnappedPoint SnapManager::constrainedSnapStretch(Inkscape::Snapper::PointType t, std::vector const &p, - std::list const &it, + std::vector const &it, NR::Coord const &s, NR::Point const &o, NR::Dim2 d, @@ -710,7 +716,7 @@ Inkscape::SnappedPoint SnapManager::constrainedSnapStretch(Inkscape::Snapper::Po Inkscape::SnappedPoint SnapManager::freeSnapSkew(Inkscape::Snapper::PointType t, std::vector const &p, - std::list const &it, + std::vector const &it, NR::Coord const &s, NR::Point const &o, NR::Dim2 d) const diff --git a/src/snap.h b/src/snap.h index 8bab5b0cf..0de8902f4 100644 --- a/src/snap.h +++ b/src/snap.h @@ -61,7 +61,7 @@ public: NR::Point const &p, bool const &first_point, std::vector &points_to_snap, - std::list const &it, + std::vector const &it, std::vector *unselected_nodes) const; Inkscape::SnappedPoint constrainedSnap(Inkscape::Snapper::PointType t, @@ -74,37 +74,37 @@ public: bool const &first_point, std::vector &points_to_snap, Inkscape::Snapper::ConstraintLine const &c, - std::list const &it) const; + std::vector const &it) const; Inkscape::SnappedPoint guideSnap(NR::Point const &p, NR::Point const &guide_normal) const; Inkscape::SnappedPoint freeSnapTranslation(Inkscape::Snapper::PointType t, std::vector const &p, - std::list const &it, + std::vector const &it, NR::Point const &tr) const; Inkscape::SnappedPoint constrainedSnapTranslation(Inkscape::Snapper::PointType t, std::vector const &p, - std::list const &it, + std::vector const &it, Inkscape::Snapper::ConstraintLine const &c, NR::Point const &tr) const; Inkscape::SnappedPoint freeSnapScale(Inkscape::Snapper::PointType t, std::vector const &p, - std::list const &it, + std::vector const &it, NR::scale const &s, NR::Point const &o) const; Inkscape::SnappedPoint constrainedSnapScale(Inkscape::Snapper::PointType t, std::vector const &p, - std::list const &it, + std::vector const &it, NR::scale const &s, NR::Point const &o) const; Inkscape::SnappedPoint constrainedSnapStretch(Inkscape::Snapper::PointType t, std::vector const &p, - std::list const &it, + std::vector const &it, NR::Coord const &s, NR::Point const &o, NR::Dim2 d, @@ -112,7 +112,7 @@ public: Inkscape::SnappedPoint freeSnapSkew(Inkscape::Snapper::PointType t, std::vector const &p, - std::list const &it, + std::vector const &it, NR::Coord const &s, NR::Point const &o, NR::Dim2 d) const; @@ -180,7 +180,7 @@ private: Inkscape::SnappedPoint _snapTransformed(Inkscape::Snapper::PointType type, std::vector const &points, - std::list const &ignore, + std::vector const &ignore, bool constrained, Inkscape::Snapper::ConstraintLine const &constraint, Transformation transformation_type, diff --git a/src/snapper.cpp b/src/snapper.cpp index 31a96a871..803506e76 100644 --- a/src/snapper.cpp +++ b/src/snapper.cpp @@ -104,7 +104,7 @@ void Inkscape::Snapper::freeSnap(SnappedConstraints &sc, std::vector &points_to_snap, SPItem const *it) const { - std::list lit; + std::vector lit; if (it) { lit.push_back(it); } @@ -128,7 +128,7 @@ void Inkscape::Snapper::freeSnap(SnappedConstraints &sc, NR::Point const &p, bool const &first_point, std::vector &points_to_snap, - std::list const &it, + std::vector const &it, std::vector *unselected_nodes) const { if (_snap_enabled == false || getSnapFrom(t) == false) { @@ -160,8 +160,10 @@ void Inkscape::Snapper::constrainedSnap(SnappedConstraints &sc, ConstraintLine const &c, SPItem const *it) const { - std::list lit; - lit.push_back(it); + std::vector lit; + if (it) { + lit.push_back(it); + } constrainedSnap(sc, t, p, first_point, points_to_snap, c, lit); } @@ -183,7 +185,7 @@ void Inkscape::Snapper::constrainedSnap(SnappedConstraints &sc, bool const &first_point, std::vector &points_to_snap, ConstraintLine const &c, - std::list const &it) const + std::vector const &it) const { if (_snap_enabled == false || getSnapFrom(t) == false) { return; diff --git a/src/snapper.h b/src/snapper.h index 508ba7b9a..cad4200ab 100644 --- a/src/snapper.h +++ b/src/snapper.h @@ -75,7 +75,7 @@ public: NR::Point const &p, bool const &first_point, std::vector &points_to_snap, - std::list const &it, + std::vector const &it, std::vector *unselected_nodes) const; class ConstraintLine @@ -117,7 +117,7 @@ public: bool const &first_point, std::vector &points_to_snap, ConstraintLine const &c, - std::list const &it) const; + std::vector const &it) const; protected: SPNamedView const *_named_view; @@ -144,7 +144,7 @@ private: NR::Point const &p, bool const &first_point, std::vector &points_to_snap, - std::list const &it, + std::vector const &it, std::vector *unselected_nodes) const = 0; /** @@ -163,7 +163,7 @@ private: bool const &first_point, std::vector &points_to_snap, ConstraintLine const &c, - std::list const &it) const = 0; + std::vector const &it) const = 0; }; }