summaryrefslogtreecommitdiff
path: root/basegfx/source/tools
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-05-16 14:06:30 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-05-18 09:17:30 +0200
commit60861faa8653afebb504cfbcaeed633d2373a27d (patch)
tree1dec7a4ba05a212052fd64439645f024643d78ec /basegfx/source/tools
parentd89fa2bd4944625e2dbe56d5709a3f126db24f21 (diff)
loplugin:comparisonwithconstant in basegfx
Change-Id: I6953640a1aa2e58fe2ea6555291c4f4a5271770f Reviewed-on: https://gerrit.libreoffice.org/37680 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'basegfx/source/tools')
-rw-r--r--basegfx/source/tools/stringconversiontools.cxx16
-rw-r--r--basegfx/source/tools/unotools.cxx12
2 files changed, 14 insertions, 14 deletions
diff --git a/basegfx/source/tools/stringconversiontools.cxx b/basegfx/source/tools/stringconversiontools.cxx
index 6cae400bb3df..569d7d0c50f2 100644
--- a/basegfx/source/tools/stringconversiontools.cxx
+++ b/basegfx/source/tools/stringconversiontools.cxx
@@ -29,7 +29,7 @@ namespace basegfx
const sal_Int32 nLen)
{
while( io_rPos < nLen &&
- ' ' == rStr[io_rPos] )
+ rStr[io_rPos] == ' ' )
{
++io_rPos;
}
@@ -40,7 +40,7 @@ namespace basegfx
const sal_Int32 nLen)
{
while(io_rPos < nLen
- && (' ' == rStr[io_rPos] || ',' == rStr[io_rPos]))
+ && (rStr[io_rPos] == ' ' || rStr[io_rPos] == ','))
{
++io_rPos;
}
@@ -54,7 +54,7 @@ namespace basegfx
OUStringBuffer sNumberString;
// sign
- if('+' == aChar || '-' == aChar)
+ if(aChar == '+' || aChar == '-')
{
sNumberString.append(rStr[io_rPos]);
aChar = rStr[++io_rPos];
@@ -69,7 +69,7 @@ namespace basegfx
}
// point
- if('.' == aChar)
+ if(aChar == '.')
{
sNumberString.append(rStr[io_rPos]);
io_rPos++;
@@ -85,14 +85,14 @@ namespace basegfx
}
// 'e'
- if('e' == aChar || 'E' == aChar)
+ if(aChar == 'e' || aChar == 'E')
{
sNumberString.append(rStr[io_rPos]);
io_rPos++;
aChar = io_rPos < rStr.getLength() ? rStr[io_rPos] : 0;
// sign for 'e'
- if('+' == aChar || '-' == aChar)
+ if(aChar == '+' || aChar == '-')
{
sNumberString.append(rStr[io_rPos]);
io_rPos++;
@@ -141,12 +141,12 @@ namespace basegfx
{
sal_Unicode aChar( rStr[io_rPos] );
- if('0' == aChar)
+ if(aChar == '0')
{
o_nRetval = 0;
++io_rPos;
}
- else if ('1' == aChar)
+ else if (aChar == '1')
{
o_nRetval = 1;
++io_rPos;
diff --git a/basegfx/source/tools/unotools.cxx b/basegfx/source/tools/unotools.cxx
index ab4205ac71f5..6b5b47ca9459 100644
--- a/basegfx/source/tools/unotools.cxx
+++ b/basegfx/source/tools/unotools.cxx
@@ -70,7 +70,7 @@ namespace unotools
basegfx::B2DPoint aControlB;
// first point is not allowed to be a control point
- if(drawing::PolygonFlags_CONTROL == ePolyFlag)
+ if(ePolyFlag == drawing::PolygonFlags_CONTROL)
throw lang::IllegalArgumentException();
// add first point as start point
@@ -86,7 +86,7 @@ namespace unotools
ePolyFlag = *pArrayFlags;
pArray++; pArrayFlags++; b++;
- if(b < nInnerSequenceCount && drawing::PolygonFlags_CONTROL == ePolyFlag)
+ if(b < nInnerSequenceCount && ePolyFlag == drawing::PolygonFlags_CONTROL)
{
aControlA = aNewCoordinatePair;
bControlA = true;
@@ -97,7 +97,7 @@ namespace unotools
pArray++; pArrayFlags++; b++;
}
- if(b < nInnerSequenceCount && drawing::PolygonFlags_CONTROL == ePolyFlag)
+ if(b < nInnerSequenceCount && ePolyFlag == drawing::PolygonFlags_CONTROL)
{
aControlB = aNewCoordinatePair;
bControlB = true;
@@ -110,7 +110,7 @@ namespace unotools
// two or no control points are consumed, another one would be an error.
// It's also an error if only one control point was read
- if(drawing::PolygonFlags_CONTROL == ePolyFlag || bControlA != bControlB)
+ if(ePolyFlag == drawing::PolygonFlags_CONTROL || bControlA != bControlB)
throw lang::IllegalArgumentException();
// the previous writes used the B2DPolyPoygon -> tools::PolyPolygon converter
@@ -214,11 +214,11 @@ namespace unotools
{
const basegfx::B2VectorContinuity eCont(rPoly.getContinuityInPoint(b));
- if(basegfx::B2VectorContinuity::C1 == eCont)
+ if(eCont == basegfx::B2VectorContinuity::C1)
{
aFlags[nStartPointIndex] = drawing::PolygonFlags_SMOOTH;
}
- else if(basegfx::B2VectorContinuity::C2 == eCont)
+ else if(eCont == basegfx::B2VectorContinuity::C2)
{
aFlags[nStartPointIndex] = drawing::PolygonFlags_SYMMETRIC;
}