summaryrefslogtreecommitdiff
path: root/sc/source/filter/xml/xmlstyli.cxx
diff options
context:
space:
mode:
authorKayo Hamid <kayo.hamid@gekkolinux.com.br>2011-04-22 11:31:04 +0200
committerCédric Bosdonnat <cedric.bosdonnat.ooo@free.fr>2011-04-22 11:31:04 +0200
commitee0110327ab820f255eb486b1afa8381087dee2f (patch)
treebe53987876d76b55212ad6ca0b69cd5150c0d762 /sc/source/filter/xml/xmlstyli.cxx
parent9864542a3f8628471c5925ca79e5426a8d3c9ded (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 'sc/source/filter/xml/xmlstyli.cxx')
-rw-r--r--sc/source/filter/xml/xmlstyli.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/sc/source/filter/xml/xmlstyli.cxx b/sc/source/filter/xml/xmlstyli.cxx
index 19dc029e4efb..2474a82c3dfa 100644
--- a/sc/source/filter/xml/xmlstyli.cxx
+++ b/sc/source/filter/xml/xmlstyli.cxx
@@ -525,7 +525,7 @@ void XMLTableStyleContext::FillPropertySet(
sal_Int32 nNumFmt = GetNumberFormat();
if (nNumFmt >= 0)
AddProperty(CTF_SC_NUMBERFORMAT, uno::makeAny(nNumFmt));
- if (!bConditionalFormatCreated && (aMaps.size() > 0))
+ if (!bConditionalFormatCreated && (!aMaps.empty()))
{
aConditionalFormat = rPropSet->getPropertyValue(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNONAME_CONDXML)));
std::vector<ScXMLMapContent>::iterator aItr(aMaps.begin());