[Libreoffice-commits] core.git: unodevtools/source

Julien Nabet serval2412 at yahoo.fr
Sat Jun 21 05:27:41 PDT 2014


 unodevtools/source/skeletonmaker/skeletoncommon.cxx |   15 ++++-----------
 1 file changed, 4 insertions(+), 11 deletions(-)

New commits:
commit f8cd68bad6728a5402401a3b7235f7d5d22c0ce1
Author: Julien Nabet <serval2412 at yahoo.fr>
Date:   Sat Jun 21 14:26:35 2014 +0200

    cppcheck: Redundant checking of STL container
    
    Change-Id: I83a8671e90431bbc4f41392f062d37c452b018ff

diff --git a/unodevtools/source/skeletonmaker/skeletoncommon.cxx b/unodevtools/source/skeletonmaker/skeletoncommon.cxx
index 37af9d5..25679bc 100644
--- a/unodevtools/source/skeletonmaker/skeletoncommon.cxx
+++ b/unodevtools/source/skeletonmaker/skeletoncommon.cxx
@@ -274,23 +274,16 @@ void checkDefaultInterfaces(
     const OUString & propertyhelper)
 {
     if ( services.empty() ) {
-        if (interfaces.find("com.sun.star.lang.XServiceInfo") != interfaces.end())
-            interfaces.erase("com.sun.star.lang.XServiceInfo");
+        interfaces.erase("com.sun.star.lang.XServiceInfo");
     } else {
         if (interfaces.find("com.sun.star.lang.XServiceInfo") == interfaces.end())
             interfaces.insert("com.sun.star.lang.XServiceInfo");
     }
 
     if ( propertyhelper.equals("_") ) {
-        if (interfaces.find("com.sun.star.beans.XPropertySet")
-            != interfaces.end())
-            interfaces.erase("com.sun.star.beans.XPropertySet");
-        if (interfaces.find("com.sun.star.beans.XFastPropertySet")
-            != interfaces.end())
-            interfaces.erase("com.sun.star.beans.XFastPropertySet");
-        if (interfaces.find("com.sun.star.beans.XPropertyAccess")
-            != interfaces.end())
-            interfaces.erase("com.sun.star.beans.XPropertyAccess");
+        interfaces.erase("com.sun.star.beans.XPropertySet");
+        interfaces.erase("com.sun.star.beans.XFastPropertySet");
+        interfaces.erase("com.sun.star.beans.XPropertyAccess");
     }
 }
 


More information about the Libreoffice-commits mailing list