summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d0f782f)
raw | patch | inline | side by side (parent: d0f782f)
author | joncruz <joncruz@users.sourceforge.net> | |
Sat, 8 Mar 2008 21:47:40 +0000 (21:47 +0000) | ||
committer | joncruz <joncruz@users.sourceforge.net> | |
Sat, 8 Mar 2008 21:47:40 +0000 (21:47 +0000) |
src/snapped-point.cpp | patch | blob | history |
diff --git a/src/snapped-point.cpp b/src/snapped-point.cpp
index 8a0aea3c7594687e876fe7bdd14259313e7c9d3c..1ece54a5ddc9cbf21e001ef88bae0c2cacc13167 100644 (file)
--- a/src/snapped-point.cpp
+++ b/src/snapped-point.cpp
}
Inkscape::SnappedPoint::SnappedPoint(NR::Point p, NR::Coord d, NR::Coord t, bool a, bool at_intersection, NR::Coord d2, NR::Coord t2, bool a2)
- : _point(p), _distance(d), _tolerance(t), _always_snap(a), _at_intersection(at_intersection),
+ : _point(p), _at_intersection(at_intersection), _distance(d), _tolerance(t), _always_snap(a),
_second_distance(d2), _second_tolerance(t2), _second_always_snap(a2)
{
}
}
// search for the closest snapped point
-bool getClosestSP(std::list<Inkscape::SnappedPoint> &list, Inkscape::SnappedPoint &result)
+bool getClosestSP(std::list<Inkscape::SnappedPoint> &list, Inkscape::SnappedPoint &result)
{
bool success = false;
-
+
for (std::list<Inkscape::SnappedPoint>::const_iterator i = list.begin(); i != list.end(); i++) {
if ((i == list.begin()) || (*i).getDistance() < result.getDistance()) {
result = *i;
success = true;
- }
+ }
}
-
+
return success;
}