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/XMLStylesExportHelper.cxx | |
parent | 9864542a3f8628471c5925ca79e5426a8d3c9ded (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.cxx | 2 |
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()); |