summaryrefslogtreecommitdiff
path: root/basegfx/source
diff options
context:
space:
mode:
authorKayo Hamid <kayo.hamid@gekkolinux.com.br>2011-04-22 11:31:13 +0200
committerC├ędric Bosdonnat <cedric.bosdonnat.ooo@free.fr>2011-04-22 11:31:13 +0200
commit9ab9d69c7da783d0c528ce58f9c8af54990eae6c (patch)
tree6061b1a6120979d3fb91231a2e01aa2749346990 /basegfx/source
parentcdc7c5772ac216f6fd91ead7d8d57fd0ad03a0aa (diff)
cppcheck inefficient checking for emptiness
From cppcheck: Using xxxx.empty() instead of xxxx.size() can be faster. xxxx.size() can take linear time but xxxx.empty() is guaranteed to take constant time
Diffstat (limited to 'basegfx/source')
-rw-r--r--basegfx/source/polygon/b2dpolypolygoncutter.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/basegfx/source/polygon/b2dpolypolygoncutter.cxx b/basegfx/source/polygon/b2dpolypolygoncutter.cxx
index b6dad1e917fa..1b15b953e29e 100644
--- a/basegfx/source/polygon/b2dpolypolygoncutter.cxx
+++ b/basegfx/source/polygon/b2dpolypolygoncutter.cxx
@@ -933,7 +933,7 @@ namespace basegfx
// first step: prepareForPolygonOperation and simple merge of non-overlapping
// PolyPolygons for speedup; this is possible for the wanted OR-operation
- if(aInput.size())
+ if(!aInput.empty())
{
std::vector< basegfx::B2DPolyPolygon > aResult;
aResult.reserve(aInput.size());
@@ -942,7 +942,7 @@ namespace basegfx
{
const basegfx::B2DPolyPolygon aCandidate(prepareForPolygonOperation(aInput[a]));
- if(aResult.size())
+ if(!aResult.empty())
{
const B2DRange aCandidateRange(aCandidate.getB2DRange());
bool bCouldMergeSimple(false);