diff options
| author | Marc Jeanmougin <marc@jeanmougin.fr> | 2018-12-20 22:40:28 +0000 |
|---|---|---|
| committer | Marc Jeanmougin <marc@jeanmougin.fr> | 2018-12-20 22:40:28 +0000 |
| commit | 6e897f586583357dc0dd320b66da9b6ac062d36c (patch) | |
| tree | feaa0afab5fd4de73a42dad779d1363b85a9ead2 /src | |
| parent | Merge branch 'patch/impl-git-tracking-rules-for-snap' of gitlab.com:Lin-Buo-R... (diff) | |
| parent | Remove redundant bool variable and else before a return (diff) | |
| download | inkscape-6e897f586583357dc0dd320b66da9b6ac062d36c.tar.gz inkscape-6e897f586583357dc0dd320b66da9b6ac062d36c.zip | |
Merge branch 'master' of gitlab.com:wilfredor2/inkscape
Diffstat (limited to 'src')
| -rw-r--r-- | src/display/curve.cpp | 20 | ||||
| -rw-r--r-- | src/display/grayscale.cpp | 4 |
2 files changed, 13 insertions, 11 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; } diff --git a/src/display/grayscale.cpp b/src/display/grayscale.cpp index f00157c9d..fb77dfa87 100644 --- a/src/display/grayscale.cpp +++ b/src/display/grayscale.cpp @@ -85,9 +85,9 @@ unsigned char luminance(unsigned char r, unsigned char g, unsigned char b) { bool activeDesktopIsGrayscale() { if (SP_ACTIVE_DESKTOP) { return (SP_ACTIVE_DESKTOP->getColorMode() == Inkscape::COLORMODE_GRAYSCALE); - } else { - return false; } + + return false; } |
