summaryrefslogtreecommitdiff
path: root/sc/source/filter/xml/XMLStylesExportHelper.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/XMLStylesExportHelper.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/XMLStylesExportHelper.cxx')
-rw-r--r--sc/source/filter/xml/XMLStylesExportHelper.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/sc/source/filter/xml/XMLStylesExportHelper.cxx b/sc/source/filter/xml/XMLStylesExportHelper.cxx
index c3685941c736..34069bad6365 100644
--- a/sc/source/filter/xml/XMLStylesExportHelper.cxx
+++ b/sc/source/filter/xml/XMLStylesExportHelper.cxx
@@ -357,7 +357,7 @@ void ScMyValidationsContainer::WriteMessage(ScXMLExport& rExport,
void ScMyValidationsContainer::WriteValidations(ScXMLExport& rExport)
{
- if (aValidationVec.size())
+ if (!aValidationVec.empty())
{
SvXMLElementExport aElemVs(rExport, XML_NAMESPACE_TABLE, XML_CONTENT_VALIDATIONS, sal_True, sal_True);
ScMyValidationVec::iterator aItr(aValidationVec.begin());