diff options
author | Kayo Hamid <kayo.hamid@gekkolinux.com.br> | 2011-04-22 11:31:13 +0200 |
---|---|---|
committer | Cédric Bosdonnat <cedric.bosdonnat.ooo@free.fr> | 2011-04-22 11:31:13 +0200 |
commit | 9ab9d69c7da783d0c528ce58f9c8af54990eae6c (patch) | |
tree | 6061b1a6120979d3fb91231a2e01aa2749346990 /basegfx | |
parent | Easyhack: Add visibility markup to all component_get* functions (diff) | |
download | core-9ab9d69c7da783d0c528ce58f9c8af54990eae6c.tar.gz core-9ab9d69c7da783d0c528ce58f9c8af54990eae6c.zip |
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')
-rw-r--r-- | basegfx/source/polygon/b2dpolypolygoncutter.cxx | 4 |
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); |