From e8f4c644181a8a68e2c33e1783f77a400dc1a29f Mon Sep 17 00:00:00 2001 From: Diederik van Lierop Date: Sat, 9 Jan 2010 22:14:38 +0100 Subject: Refactoring the snapping API (making it easier to maintain and understand for the devs) (bzr r8960) --- src/sp-item-notify-moveto.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/sp-item-notify-moveto.cpp') diff --git a/src/sp-item-notify-moveto.cpp b/src/sp-item-notify-moveto.cpp index 0bc08a235..628d77956 100644 --- a/src/sp-item-notify-moveto.cpp +++ b/src/sp-item-notify-moveto.cpp @@ -24,11 +24,11 @@ void sp_item_notify_moveto(SPItem &item, SPGuide const &mv_g, int const snappoin double const dir_lensq(dot(dir, dir)); g_return_if_fail( dir_lensq != 0 ); - SnapPointsWithType snappoints; - sp_item_snappoints(&item, false, snappoints, NULL); + std::vector snappoints; + sp_item_snappoints(&item, snappoints, NULL); g_return_if_fail( snappoint_ix < int(snappoints.size()) ); - double const pos0 = dot(dir, snappoints[snappoint_ix].first); + double const pos0 = dot(dir, snappoints[snappoint_ix].getPoint()); /// \todo effic: skip if mv_g is already satisfied. /* Translate along dir to make dot(dir, snappoints(item)[snappoint_ix]) == position. */ -- cgit v1.2.3