diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2017-07-25 09:10:01 +0200 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2017-07-25 11:55:36 +0200 |
commit | 04a6a5d5cdc6889c6f0e41b3df537f59baeee9f9 (patch) | |
tree | f41806f8ab662dd81244820b22a83ebb176ef9a5 | |
parent | 766be157be2cfb3a230b8dae9778a7151b8adbad (diff) |
OOXMLPropertySet::add: remove redundant check
Change-Id: I06aa0d2a2e463069ad200c93329d263f0bd2a00e
Reviewed-on: https://gerrit.libreoffice.org/40388
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
-rw-r--r-- | writerfilter/source/ooxml/OOXMLPropertySet.cxx | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/writerfilter/source/ooxml/OOXMLPropertySet.cxx b/writerfilter/source/ooxml/OOXMLPropertySet.cxx index b7b50d1bf20f..da8a3dd1bf23 100644 --- a/writerfilter/source/ooxml/OOXMLPropertySet.cxx +++ b/writerfilter/source/ooxml/OOXMLPropertySet.cxx @@ -395,17 +395,14 @@ void OOXMLPropertySet::add(const OOXMLProperty::Pointer_t& pProperty) void OOXMLPropertySet::add(const OOXMLPropertySet::Pointer_t& pPropertySet) { - if (pPropertySet.get() != nullptr) + OOXMLPropertySet * pSet = pPropertySet.get(); + + if (pSet != nullptr) { - OOXMLPropertySet * pSet = pPropertySet.get(); - - if (pSet != nullptr) - { - mProperties.resize(mProperties.size() + pSet->mProperties.size()); - for (OOXMLProperties_t::iterator aIt = pSet->mProperties.begin(); - aIt != pSet->mProperties.end(); ++aIt) - add(*aIt); - } + mProperties.resize(mProperties.size() + pSet->mProperties.size()); + for (OOXMLProperties_t::iterator aIt = pSet->mProperties.begin(); + aIt != pSet->mProperties.end(); ++aIt) + add(*aIt); } } |