summaryrefslogtreecommitdiffstats
path: root/src/rubberband.cpp
diff options
context:
space:
mode:
authorKris De Gussem <kris.degussem@gmail.com>2011-10-20 19:12:09 +0000
committerKris <Kris.De.Gussem@hotmail.com>2011-10-20 19:12:09 +0000
commit4012b2b37ebabcbdf8a695b418ebc05b897ad0cd (patch)
tree8cc006f097f7a44b1fa65c9231db576d1145dcd7 /src/rubberband.cpp
parentFilters. Filters file update (changes in Non Realistic 3D Shaders). (diff)
downloadinkscape-4012b2b37ebabcbdf8a695b418ebc05b897ad0cd.tar.gz
inkscape-4012b2b37ebabcbdf8a695b418ebc05b897ad0cd.zip
cppcheck
(bzr r10686)
Diffstat (limited to 'src/rubberband.cpp')
-rw-r--r--src/rubberband.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/rubberband.cpp b/src/rubberband.cpp
index a59664092..00f87cf8e 100644
--- a/src/rubberband.cpp
+++ b/src/rubberband.cpp
@@ -85,7 +85,7 @@ void Inkscape::Rubberband::move(Geom::Point const &p)
// we want the points to be at most 0.5 screen pixels apart,
// so that we don't lose anything small;
// if they are farther apart, we interpolate more points
- if (_points.size() > 0 && Geom::L2(next-_points.back()) > 0.5) {
+ if (!_points.empty() && Geom::L2(next-_points.back()) > 0.5) {
Geom::Point prev = _points.back();
int subdiv = 2 * (int) round(Geom::L2(next-prev) + 0.5);
for (int i = 1; i <= subdiv; i ++) {