summaryrefslogtreecommitdiff
path: root/basegfx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-02-26 12:07:24 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-02-27 07:35:11 +0100
commit4d502ef3559f53d75e4ee3c85b90ea36816049e8 (patch)
tree6fc23dab1ded365962295c5a3fdf498c726853f3 /basegfx
parent19240f625f8bd7b772481abc8e678d7b0fadd921 (diff)
loplugin:simplifybool improve search for negated operator
Change-Id: Id6ac35fefa5c3e1f64c222713791e849b3cb4d34 Reviewed-on: https://gerrit.libreoffice.org/68379 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'basegfx')
-rw-r--r--basegfx/source/polygon/b2dpolypolygon.cxx10
-rw-r--r--basegfx/source/polygon/b3dpolygon.cxx12
2 files changed, 7 insertions, 15 deletions
diff --git a/basegfx/source/polygon/b2dpolypolygon.cxx b/basegfx/source/polygon/b2dpolypolygon.cxx
index 14e2d17c6bde..bbdc54a15481 100644
--- a/basegfx/source/polygon/b2dpolypolygon.cxx
+++ b/basegfx/source/polygon/b2dpolypolygon.cxx
@@ -81,15 +81,7 @@ public:
bool operator==(const ImplB2DPolyPolygon& rPolygonList) const
{
- // same polygon count?
- if(maPolygons.size() != rPolygonList.maPolygons.size())
- return false;
-
- // compare polygon content
- if(!(maPolygons == rPolygonList.maPolygons))
- return false;
-
- return true;
+ return maPolygons == rPolygonList.maPolygons;
}
const basegfx::B2DPolygon& getB2DPolygon(sal_uInt32 nIndex) const
diff --git a/basegfx/source/polygon/b3dpolygon.cxx b/basegfx/source/polygon/b3dpolygon.cxx
index 41f5add1f434..9817fb43f6fb 100644
--- a/basegfx/source/polygon/b3dpolygon.cxx
+++ b/basegfx/source/polygon/b3dpolygon.cxx
@@ -1316,17 +1316,17 @@ public:
const sal_uInt32 nIndex(maPoints.count() - 1);
bRemove = (maPoints.getCoordinate(0) == maPoints.getCoordinate(nIndex));
- if(bRemove && mpBColors && !(mpBColors->getBColor(0) == mpBColors->getBColor(nIndex)))
+ if(bRemove && mpBColors && mpBColors->getBColor(0) != mpBColors->getBColor(nIndex))
{
bRemove = false;
}
- if(bRemove && mpNormals && !(mpNormals->getNormal(0) == mpNormals->getNormal(nIndex)))
+ if(bRemove && mpNormals && mpNormals->getNormal(0) != mpNormals->getNormal(nIndex))
{
bRemove = false;
}
- if(bRemove && mpTextureCoordinates && !(mpTextureCoordinates->getTextureCoordinate(0) == mpTextureCoordinates->getTextureCoordinate(nIndex)))
+ if(bRemove && mpTextureCoordinates && mpTextureCoordinates->getTextureCoordinate(0) != mpTextureCoordinates->getTextureCoordinate(nIndex))
{
bRemove = false;
}
@@ -1352,17 +1352,17 @@ public:
const sal_uInt32 nNextIndex(nIndex + 1);
bool bRemove(maPoints.getCoordinate(nIndex) == maPoints.getCoordinate(nNextIndex));
- if(bRemove && mpBColors && !(mpBColors->getBColor(nIndex) == mpBColors->getBColor(nNextIndex)))
+ if(bRemove && mpBColors && mpBColors->getBColor(nIndex) != mpBColors->getBColor(nNextIndex))
{
bRemove = false;
}
- if(bRemove && mpNormals && !(mpNormals->getNormal(nIndex) == mpNormals->getNormal(nNextIndex)))
+ if(bRemove && mpNormals && mpNormals->getNormal(nIndex) != mpNormals->getNormal(nNextIndex))
{
bRemove = false;
}
- if(bRemove && mpTextureCoordinates && !(mpTextureCoordinates->getTextureCoordinate(nIndex) == mpTextureCoordinates->getTextureCoordinate(nNextIndex)))
+ if(bRemove && mpTextureCoordinates && mpTextureCoordinates->getTextureCoordinate(nIndex) != mpTextureCoordinates->getTextureCoordinate(nNextIndex))
{
bRemove = false;
}