[Libreoffice-commits] .: filter/source

Julien Nabet serval2412 at kemper.freedesktop.org
Tue Jun 7 14:44:40 PDT 2011


 filter/source/msfilter/msdffimp.cxx  |    6 +++---
 filter/source/msfilter/msocximex.cxx |    4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)

New commits:
commit bad20aa146e313b6c2c361cf26fa0cfbf09c6fb8
Author: Julien Nabet <serval2412 at yahoo.fr>
Date:   Tue Jun 7 23:43:52 2011 +0200

    Possible inefficient checking for emptiness

diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx
index bc8ad55..33ad7aa 100644
--- a/filter/source/msfilter/msdffimp.cxx
+++ b/filter/source/msfilter/msdffimp.cxx
@@ -1580,7 +1580,7 @@ void GetShadeColors( const SvxMSDffManager& rManager, const DffPropertyReader& r
             }
         }
     }
-    if ( !rShadeColors.size() )
+    if ( rShadeColors.empty() )
     {
         rShadeColors.push_back( ShadeColor( rManager.MSO_CLR_ToColor( rProperties.GetPropertyValue( DFF_Prop_fillBackColor, COL_WHITE ), DFF_Prop_fillBackColor ), 0 ) );
         rShadeColors.push_back( ShadeColor( rManager.MSO_CLR_ToColor( rProperties.GetPropertyValue( DFF_Prop_fillColor, COL_WHITE ), DFF_Prop_fillColor ), 1 ) );
@@ -2615,7 +2615,7 @@ void DffPropertyReader::ApplyCustomShapeGeometryAttributes( SvStream& rIn, SfxIt
                         aHandlePropVec.push_back( aProp );
                     }
                 }
-                if ( aHandlePropVec.size() )
+                if ( !aHandlePropVec.empty() )
                 {
                     PropSeq aHandlePropSeq( aHandlePropVec.size() );
                     aIter = aHandlePropVec.begin();
@@ -2931,7 +2931,7 @@ void DffPropertyReader::ApplyCustomShapeGeometryAttributes( SvStream& rIn, SfxIt
             aPathPropVec.push_back( aProp );
         }
         // pushing the whole Path element
-        if ( aPathPropVec.size() )
+        if ( !aPathPropVec.empty() )
         {
             const rtl::OUString	sPath( RTL_CONSTASCII_USTRINGPARAM ( "Path" ) );
             PropSeq aPathPropSeq( aPathPropVec.size() );
diff --git a/filter/source/msfilter/msocximex.cxx b/filter/source/msfilter/msocximex.cxx
index 7cac4d5..9d18728 100644
--- a/filter/source/msfilter/msocximex.cxx
+++ b/filter/source/msfilter/msocximex.cxx
@@ -5171,14 +5171,14 @@ sal_Bool HTML_Select::Read(SotStorageStream *pS)
             }
         }
     }
-    if ( listValues.size() )
+    if ( !listValues.empty() )
     {
         msListData.realloc( listValues.size() );
         sal_Int32 index = 0;
         for( std::vector< rtl::OUString >::iterator it = listValues.begin(); it != listValues.end(); ++it, ++index )
              msListData[ index ] = *it;
     }
-    if ( selectedIndices.size() )
+    if ( !selectedIndices.empty() )
     {
         msIndices.realloc( selectedIndices.size() );
         sal_Int32 index = 0;


More information about the Libreoffice-commits mailing list