diff --git a/src/display/curve.cpp b/src/display/curve.cpp index 211eaaa5317e3bcc1211a9dda21962998c37aee9..33578236f2d1b6beb6b8fc38a9701d18e69a6b09 100644 --- a/src/display/curve.cpp +++ b/src/display/curve.cpp @@ -324,16 +324,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; } /** @@ -344,9 +343,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 5978dbf2a884ecec09711f511c1f890197105417..a8e3fb390040926ab26729f15438256c822d28e2 100644 --- a/src/display/grayscale.cpp +++ b/src/display/grayscale.cpp @@ -84,9 +84,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; }