summaryrefslogtreecommitdiff
path: root/svgio
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-10-19 08:12:17 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-10-19 10:02:39 +0200
commit2c1b7e8d6a7fa22cb91919238418816671c3a497 (patch)
tree6f356017d24dffcd25261295ab25a21b738dc835 /svgio
parentad18bb24d51e4f735085d50c496d28bd637dbb0b (diff)
clang-tidy readability-container-size-empty
Change-Id: I1df70b7dff5ebb6048f7fc618789faa15ca5d422 Reviewed-on: https://gerrit.libreoffice.org/61967 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svgio')
-rw-r--r--svgio/source/svgreader/svgdocumenthandler.cxx12
-rw-r--r--svgio/source/svgreader/svgstylenode.cxx2
2 files changed, 7 insertions, 7 deletions
diff --git a/svgio/source/svgreader/svgdocumenthandler.cxx b/svgio/source/svgreader/svgdocumenthandler.cxx
index 447221b55215..b9ef76de8bf2 100644
--- a/svgio/source/svgreader/svgdocumenthandler.cxx
+++ b/svgio/source/svgreader/svgdocumenthandler.cxx
@@ -157,19 +157,19 @@ namespace svgio
[&](std::unique_ptr<SvgNode> const & p) { return p.get() == mpTarget; }))
delete mpTarget;
}
- OSL_ENSURE(!maCssContents.size(), "SvgDocHdl destructed with active css style stack entry (!)");
+ OSL_ENSURE(maCssContents.empty(), "SvgDocHdl destructed with active css style stack entry (!)");
}
void SvgDocHdl::startDocument( )
{
OSL_ENSURE(!mpTarget, "Already a target at document start (!)");
- OSL_ENSURE(!maCssContents.size(), "SvgDocHdl startDocument with active css style stack entry (!)");
+ OSL_ENSURE(maCssContents.empty(), "SvgDocHdl startDocument with active css style stack entry (!)");
}
void SvgDocHdl::endDocument( )
{
OSL_ENSURE(!mpTarget, "Still a target at document end (!)");
- OSL_ENSURE(!maCssContents.size(), "SvgDocHdl endDocument with active css style stack entry (!)");
+ OSL_ENSURE(maCssContents.empty(), "SvgDocHdl endDocument with active css style stack entry (!)");
}
void SvgDocHdl::startElement( const OUString& aName, const uno::Reference< xml::sax::XAttributeList >& xAttribs )
@@ -525,7 +525,7 @@ namespace svgio
if(pCssStyle && pCssStyle->isTextCss())
{
// css style parsing
- if(maCssContents.size())
+ if(!maCssContents.empty())
{
// need to interpret css styles and remember them as StyleSheets
// #125325# Caution! the Css content may contain block comments
@@ -569,7 +569,7 @@ namespace svgio
const auto& rChilds = mpTarget->getChildren();
SvgCharacterNode* pTarget = nullptr;
- if(rChilds.size())
+ if(!rChilds.empty())
{
pTarget = dynamic_cast< SvgCharacterNode* >(rChilds[rChilds.size() - 1].get());
}
@@ -594,7 +594,7 @@ namespace svgio
if(rSvgStyleNode.isTextCss())
{
// collect characters for css style
- if(maCssContents.size())
+ if(!maCssContents.empty())
{
const OUString aTrimmedChars(aChars.trim());
diff --git a/svgio/source/svgreader/svgstylenode.cxx b/svgio/source/svgreader/svgstylenode.cxx
index 281bab937bb2..5fdd73e9828b 100644
--- a/svgio/source/svgreader/svgstylenode.cxx
+++ b/svgio/source/svgreader/svgstylenode.cxx
@@ -112,7 +112,7 @@ namespace svgio
}
}
- if(aSelectorParts.size())
+ if(!aSelectorParts.empty())
{
OUStringBuffer aConcatenatedSelector;