summaryrefslogtreecommitdiff
path: root/basegfx
diff options
context:
space:
mode:
authorThomas Arnhold <thomas@arnhold.org>2012-01-21 19:57:19 +0100
committerThomas Arnhold <thomas@arnhold.org>2012-01-21 19:58:46 +0100
commit22da27d9ddcdacaef21d667b0777052b7e817b9a (patch)
treee72e427eb7b6934b796179ed3e49ca4a8c8734a6 /basegfx
parentcfc2f1919f8cf856c0c884dac7e4eb83bece4a7f (diff)
Improve checking for emptiness
Diffstat (limited to 'basegfx')
-rw-r--r--basegfx/inc/basegfx/curve/b2dbeziertools.hxx2
-rw-r--r--basegfx/source/polygon/b2dpolygoncutandtouch.cxx10
-rw-r--r--basegfx/source/polygon/b2dpolygontriangulator.cxx2
-rw-r--r--basegfx/source/polygon/b2dtrapezoid.cxx2
-rw-r--r--basegfx/source/raster/rasterconvert3d.cxx4
5 files changed, 10 insertions, 10 deletions
diff --git a/basegfx/inc/basegfx/curve/b2dbeziertools.hxx b/basegfx/inc/basegfx/curve/b2dbeziertools.hxx
index 2279cb9a8f24..821cc33c723f 100644
--- a/basegfx/inc/basegfx/curve/b2dbeziertools.hxx
+++ b/basegfx/inc/basegfx/curve/b2dbeziertools.hxx
@@ -54,7 +54,7 @@ namespace basegfx
public:
B2DCubicBezierHelper(const B2DCubicBezier& rBase, sal_uInt32 nDivisions = 9);
- double getLength() const { if(maLengthArray.size()) return maLengthArray[maLengthArray.size() - 1]; else return 0.0; }
+ double getLength() const { if(!maLengthArray.empty()) return maLengthArray[maLengthArray.size() - 1]; else return 0.0; }
double distanceToRelative(double fDistance) const;
};
} // end of namespace basegfx
diff --git a/basegfx/source/polygon/b2dpolygoncutandtouch.cxx b/basegfx/source/polygon/b2dpolygoncutandtouch.cxx
index 011ecff8ad10..d4d075bfc9bf 100644
--- a/basegfx/source/polygon/b2dpolygoncutandtouch.cxx
+++ b/basegfx/source/polygon/b2dpolygoncutandtouch.cxx
@@ -437,7 +437,7 @@ namespace basegfx
// #i76891# using findCuts recursively is not sufficient here
findCutsAndTouchesAndCommonForBezier(aTempPolygonA, aTempPolygonEdge, aTempPointVectorA, aTempPointVectorEdge);
- if(aTempPointVectorA.size())
+ if(!aTempPointVectorA.empty())
{
// adapt tempVector entries to segment
adaptAndTransferCutsWithBezierSegment(aTempPointVectorA, aTempPolygonA, nIndA, rTempPointsA);
@@ -479,13 +479,13 @@ namespace basegfx
// #i76891# using findCuts recursively is not sufficient here
findCutsAndTouchesAndCommonForBezier(aTempPolygonA, aTempPolygonB, aTempPointVectorA, aTempPointVectorB);
- if(aTempPointVectorA.size())
+ if(!aTempPointVectorA.empty())
{
// adapt tempVector entries to segment
adaptAndTransferCutsWithBezierSegment(aTempPointVectorA, aTempPolygonA, nIndA, rTempPointsA);
}
- if(aTempPointVectorB.size())
+ if(!aTempPointVectorB.empty())
{
// adapt tempVector entries to segment
adaptAndTransferCutsWithBezierSegment(aTempPointVectorB, aTempPolygonB, nIndB, rTempPointsB);
@@ -518,7 +518,7 @@ namespace basegfx
rCubicA.adaptiveSubdivideByCount(aTempPolygon, SUBDIVIDE_FOR_CUT_TEST_COUNT);
findCuts(aTempPolygon, aTempPointVector);
- if(aTempPointVector.size())
+ if(!aTempPointVector.empty())
{
// adapt tempVector entries to segment
adaptAndTransferCutsWithBezierSegment(aTempPointVector, aTempPolygon, nInd, rTempPoints);
@@ -715,7 +715,7 @@ namespace basegfx
rCubicA.adaptiveSubdivideByCount(aTempPolygon, SUBDIVIDE_FOR_CUT_TEST_COUNT);
findTouches(aTempPolygon, rPointPolygon, aTempPointVector);
- if(aTempPointVector.size())
+ if(!aTempPointVector.empty())
{
// adapt tempVector entries to segment
adaptAndTransferCutsWithBezierSegment(aTempPointVector, aTempPolygon, nInd, rTempPoints);
diff --git a/basegfx/source/polygon/b2dpolygontriangulator.cxx b/basegfx/source/polygon/b2dpolygontriangulator.cxx
index 66666e55a563..121211d2501b 100644
--- a/basegfx/source/polygon/b2dpolygontriangulator.cxx
+++ b/basegfx/source/polygon/b2dpolygontriangulator.cxx
@@ -261,7 +261,7 @@ namespace basegfx
}
}
- if(maStartEntries.size())
+ if(!maStartEntries.empty())
{
// sort initial list
::std::sort(maStartEntries.begin(), maStartEntries.end());
diff --git a/basegfx/source/polygon/b2dtrapezoid.cxx b/basegfx/source/polygon/b2dtrapezoid.cxx
index 8c43bfecda9d..fc2a43ba81da 100644
--- a/basegfx/source/polygon/b2dtrapezoid.cxx
+++ b/basegfx/source/polygon/b2dtrapezoid.cxx
@@ -550,7 +550,7 @@ namespace basegfx
}
}
- if(maTrDeEdgeEntries.size())
+ if(!maTrDeEdgeEntries.empty())
{
// single and initial sort of traversing edges
maTrDeEdgeEntries.sort();
diff --git a/basegfx/source/raster/rasterconvert3d.cxx b/basegfx/source/raster/rasterconvert3d.cxx
index 3ff9486d37ac..9c9c8e01b4b3 100644
--- a/basegfx/source/raster/rasterconvert3d.cxx
+++ b/basegfx/source/raster/rasterconvert3d.cxx
@@ -66,7 +66,7 @@ namespace basegfx
void RasterConverter3D::rasterconvertB3DArea(sal_Int32 nStartLine, sal_Int32 nStopLine)
{
- if(maLineEntries.size())
+ if(!maLineEntries.empty())
{
OSL_ENSURE(nStopLine >= nStartLine, "nStopLine is bigger than nStartLine (!)");
@@ -317,7 +317,7 @@ namespace basegfx
}
}
- if(maLineEntries.size())
+ if(!maLineEntries.empty())
{
rasterconvertB3DArea(nStartLine, nStopLine);
}