diff options
author | Kayo Hamid <kayo.hamid@gekkolinux.com.br> | 2011-04-22 11:31:04 +0200 |
---|---|---|
committer | Cédric Bosdonnat <cedric.bosdonnat.ooo@free.fr> | 2011-04-22 11:31:04 +0200 |
commit | ee0110327ab820f255eb486b1afa8381087dee2f (patch) | |
tree | be53987876d76b55212ad6ca0b69cd5150c0d762 /sc/source/filter/xml/xmlstyli.cxx | |
parent | disable the testCVE unittest for now because it breaks in some cases (diff) | |
download | core-ee0110327ab820f255eb486b1afa8381087dee2f.tar.gz core-ee0110327ab820f255eb486b1afa8381087dee2f.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 'sc/source/filter/xml/xmlstyli.cxx')
-rw-r--r-- | sc/source/filter/xml/xmlstyli.cxx | 2 |
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()); |