writerfilter/source/ooxml/OOXMLPropertySet.cxx |   17 +++++++----------
 1 file changed, 7 insertions(+), 10 deletions(-)

New commits:
commit 04a6a5d5cdc6889c6f0e41b3df537f59baeee9f9
Author: Mike Kaganski <mike.kagan...@collabora.com>
Date:   Tue Jul 25 09:10:01 2017 +0200

    OOXMLPropertySet::add: remove redundant check
    
    Change-Id: I06aa0d2a2e463069ad200c93329d263f0bd2a00e
    Reviewed-on: https://gerrit.libreoffice.org/40388
    Tested-by: Jenkins <c...@libreoffice.org>
    Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com>

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);
     }
 }
 
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to