summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2015-11-06 23:47:42 +0100
committerJulien Nabet <serval2412@yahoo.fr>2015-11-06 23:20:39 +0000
commitd1c91627d9c7d117ee2e680f5c24844f7c4d8515 (patch)
tree24989b1493dad458362416634465302ac1c651c3 /tools
parent7d68b8e52f0571bccff9c53df2bb65c1c8aee744 (diff)
Return early
Change-Id: Ifef410c1495d1a2b99693f4669d81d6293f74f6a Reviewed-on: https://gerrit.libreoffice.org/19834 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Diffstat (limited to 'tools')
-rw-r--r--tools/source/generic/gen.cxx11
1 files changed, 5 insertions, 6 deletions
diff --git a/tools/source/generic/gen.cxx b/tools/source/generic/gen.cxx
index 33a4ae490454..8306ef8c3834 100644
--- a/tools/source/generic/gen.cxx
+++ b/tools/source/generic/gen.cxx
@@ -133,28 +133,27 @@ bool Rectangle::IsInside( const Point& rPoint ) const
if ( IsEmpty() )
return false;
- bool bRet = true;
if ( nLeft <= nRight )
{
if ( (rPoint.X() < nLeft) || (rPoint.X() > nRight) )
- bRet = false;
+ return false;
}
else
{
if ( (rPoint.X() > nLeft) || (rPoint.X() < nRight) )
- bRet = false;
+ return false;
}
if ( nTop <= nBottom )
{
if ( (rPoint.Y() < nTop) || (rPoint.Y() > nBottom) )
- bRet = false;
+ return false;
}
else
{
if ( (rPoint.Y() > nTop) || (rPoint.Y() < nBottom) )
- bRet = false;
+ return false;
}
- return bRet;
+ return true;
}
bool Rectangle::IsInside( const Rectangle& rRect ) const