summaryrefslogtreecommitdiffstats
path: root/src/display/curve.cpp
diff options
context:
space:
mode:
authorMarc Jeanmougin <marc@jeanmougin.fr>2018-12-20 22:40:28 +0000
committerMarc Jeanmougin <marc@jeanmougin.fr>2018-12-20 22:40:28 +0000
commit6e897f586583357dc0dd320b66da9b6ac062d36c (patch)
treefeaa0afab5fd4de73a42dad779d1363b85a9ead2 /src/display/curve.cpp
parentMerge branch 'patch/impl-git-tracking-rules-for-snap' of gitlab.com:Lin-Buo-R... (diff)
parentRemove redundant bool variable and else before a return (diff)
downloadinkscape-6e897f586583357dc0dd320b66da9b6ac062d36c.tar.gz
inkscape-6e897f586583357dc0dd320b66da9b6ac062d36c.zip
Merge branch 'master' of gitlab.com:wilfredor2/inkscape
Diffstat (limited to 'src/display/curve.cpp')
-rw-r--r--src/display/curve.cpp20
1 files changed, 11 insertions, 9 deletions
diff --git a/src/display/curve.cpp b/src/display/curve.cpp
index 619e7ec37..3391864ae 100644
--- a/src/display/curve.cpp
+++ b/src/display/curve.cpp
@@ -325,16 +325,15 @@ SPCurve::is_closed() const
{
if (is_empty()) {
return false;
- } else {
- bool closed = true;
- for (Geom::PathVector::const_iterator it = _pathv.begin(); it != _pathv.end(); ++it) {
- if ( ! it->closed() ) {
- closed = false;
- break;
- }
+ }
+
+ for (Geom::PathVector::const_iterator it = _pathv.begin(); it != _pathv.end(); ++it) {
+ if ( ! it->closed() ) {
+ return false;
}
- return closed;
}
+
+ return true;
}
/**
@@ -345,9 +344,12 @@ SPCurve::is_equal(SPCurve * other) const
{
if(other == nullptr) {
return false;
- } else if(_pathv == other->get_pathvector()){
+ }
+
+ if(_pathv == other->get_pathvector()){
return true;
}
+
return false;
}