From b95db4b4d6c41793e804a235a869cb5107d35b22 Mon Sep 17 00:00:00 2001 From: Diederik van Lierop Date: Fri, 11 Apr 2008 08:03:13 +0000 Subject: 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 (bzr r5407) --- src/object-snapper.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/object-snapper.cpp') 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); -- cgit v1.2.3