summaryrefslogtreecommitdiff
path: root/basegfx/source/range
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2020-04-18 14:50:39 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-04-19 08:30:31 +0200
commit5dccf84b14ed0e09262411295c5880f787342d59 (patch)
tree10a9cc313da0186f7a21c02ce8382c62b7f17c61 /basegfx/source/range
parentbc003c7d41c31509882646900c0b2cc8678f0215 (diff)
loplugin:flatten in basegfx
Change-Id: Ic8bc586e1a4977322dcb371c0fff6411783df9d7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92484 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'basegfx/source/range')
-rw-r--r--basegfx/source/range/b3drange.cxx26
1 files changed, 13 insertions, 13 deletions
diff --git a/basegfx/source/range/b3drange.cxx b/basegfx/source/range/b3drange.cxx
index a8e5f359c3e3..89bb98a1e1a5 100644
--- a/basegfx/source/range/b3drange.cxx
+++ b/basegfx/source/range/b3drange.cxx
@@ -24,19 +24,19 @@ namespace basegfx
{
void B3DRange::transform(const B3DHomMatrix& rMatrix)
{
- if(!isEmpty() && !rMatrix.isIdentity())
- {
- const B3DRange aSource(*this);
- reset();
- expand(rMatrix * B3DPoint(aSource.getMinX(), aSource.getMinY(), aSource.getMinZ()));
- expand(rMatrix * B3DPoint(aSource.getMaxX(), aSource.getMinY(), aSource.getMinZ()));
- expand(rMatrix * B3DPoint(aSource.getMinX(), aSource.getMaxY(), aSource.getMinZ()));
- expand(rMatrix * B3DPoint(aSource.getMaxX(), aSource.getMaxY(), aSource.getMinZ()));
- expand(rMatrix * B3DPoint(aSource.getMinX(), aSource.getMinY(), aSource.getMaxZ()));
- expand(rMatrix * B3DPoint(aSource.getMaxX(), aSource.getMinY(), aSource.getMaxZ()));
- expand(rMatrix * B3DPoint(aSource.getMinX(), aSource.getMaxY(), aSource.getMaxZ()));
- expand(rMatrix * B3DPoint(aSource.getMaxX(), aSource.getMaxY(), aSource.getMaxZ()));
- }
+ if(isEmpty() || rMatrix.isIdentity())
+ return;
+
+ const B3DRange aSource(*this);
+ reset();
+ expand(rMatrix * B3DPoint(aSource.getMinX(), aSource.getMinY(), aSource.getMinZ()));
+ expand(rMatrix * B3DPoint(aSource.getMaxX(), aSource.getMinY(), aSource.getMinZ()));
+ expand(rMatrix * B3DPoint(aSource.getMinX(), aSource.getMaxY(), aSource.getMinZ()));
+ expand(rMatrix * B3DPoint(aSource.getMaxX(), aSource.getMaxY(), aSource.getMinZ()));
+ expand(rMatrix * B3DPoint(aSource.getMinX(), aSource.getMinY(), aSource.getMaxZ()));
+ expand(rMatrix * B3DPoint(aSource.getMaxX(), aSource.getMinY(), aSource.getMaxZ()));
+ expand(rMatrix * B3DPoint(aSource.getMinX(), aSource.getMaxY(), aSource.getMaxZ()));
+ expand(rMatrix * B3DPoint(aSource.getMaxX(), aSource.getMaxY(), aSource.getMaxZ()));
}
B3DRange& B3DRange::operator*=( const ::basegfx::B3DHomMatrix& rMat )