summaryrefslogtreecommitdiffstats
path: root/src/line-snapper.cpp
diff options
context:
space:
mode:
authorKris De Gussem <kris.degussem@gmail.com>2012-03-07 17:19:18 +0000
committerKris <Kris.De.Gussem@hotmail.com>2012-03-07 17:19:18 +0000
commit2eb76fb0bd4b8572866d3c2390eaa82747890292 (patch)
tree673eb8fdedd2cc54fd48347fb59cc5e1e20f8508 /src/line-snapper.cpp
parentTranslations. Greek translation update by Dimitris Spingos. (diff)
downloadinkscape-2eb76fb0bd4b8572866d3c2390eaa82747890292.tar.gz
inkscape-2eb76fb0bd4b8572866d3c2390eaa82747890292.zip
cppcheck
(bzr r11052)
Diffstat (limited to 'src/line-snapper.cpp')
-rw-r--r--src/line-snapper.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/line-snapper.cpp b/src/line-snapper.cpp
index c8f10fb29..d0c4c4583 100644
--- a/src/line-snapper.cpp
+++ b/src/line-snapper.cpp
@@ -58,7 +58,7 @@ void Inkscape::LineSnapper::freeSnap(IntermSnapResults &isr,
// For this we need to know where the origin is located of the line that is currently being rotated,
std::vector<std::pair<Geom::Point, bool> > const origins_and_vectors = p.getOriginsAndVectors();
// Now we will iterate over all the origins and vectors and see which of these will get use a tangential or perpendicular snap
- for (std::vector<std::pair<Geom::Point, bool> >::const_iterator it_origin_or_vector = origins_and_vectors.begin(); it_origin_or_vector != origins_and_vectors.end(); it_origin_or_vector++) {
+ for (std::vector<std::pair<Geom::Point, bool> >::const_iterator it_origin_or_vector = origins_and_vectors.begin(); it_origin_or_vector != origins_and_vectors.end(); ++it_origin_or_vector) {
if ((*it_origin_or_vector).second) { // if "second" is true then "first" is a vector, otherwise it's a point
// When snapping a line with a constant vector (constant direction) to a guide or grid line,
// then either all points will be perpendicular/tangential or none at all. This is not very useful
@@ -137,7 +137,7 @@ void Inkscape::LineSnapper::constrainedSnap(IntermSnapResults &isr,
{
inters = Geom::intersection(constraint_line, gridguide_line);
}
- catch (Geom::InfiniteSolutions e)
+ catch (Geom::InfiniteSolutions &e)
{
// We're probably dealing with parallel lines, so snapping doesn't make any sense here
continue; // jump to the next iterator in the for-loop