[Libreoffice-commits] .: sc/source

Noel Power noelp at kemper.freedesktop.org
Mon May 30 04:09:14 PDT 2011


 sc/source/ui/vba/vbawindow.cxx     |    2 +-
 sc/source/ui/vba/vbawindows.cxx    |    2 +-
 sc/source/ui/vba/vbaworksheets.cxx |    2 +-
 sc/source/ui/view/gridwin.cxx      |    2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 847b9839a55dcbeb338c7e2edc5c093750615bb4
Author: Korrawit Pruegsanusak <detective.conan.1412 at gmail.com>
Date:   Sun May 29 11:39:15 2011 +0700

    cppcheck cleanliness Remove: (performance) Possible inefficient checking for * emptiness. Released under LGPLv3+/MPL

diff --git a/sc/source/ui/vba/vbawindow.cxx b/sc/source/ui/vba/vbawindow.cxx
index 1e04b50..da051e9 100644
--- a/sc/source/ui/vba/vbawindow.cxx
+++ b/sc/source/ui/vba/vbawindow.cxx
@@ -166,7 +166,7 @@ public:
 
     virtual ::sal_Bool SAL_CALL hasElements(  ) throw (uno::RuntimeException) 
     { 
-        return (sheets.size() > 0);
+        return ( !sheets.empty() );
     }
 
     //XNameAccess
diff --git a/sc/source/ui/vba/vbawindows.cxx b/sc/source/ui/vba/vbawindows.cxx
index 6ff7bb1..b135895 100644
--- a/sc/source/ui/vba/vbawindows.cxx
+++ b/sc/source/ui/vba/vbawindows.cxx
@@ -178,7 +178,7 @@ public:
 
     virtual ::sal_Bool SAL_CALL hasElements(  ) throw (uno::RuntimeException)
     {
-        return (m_windows.size() > 0);
+        return ( !m_windows.empty() );
     }
 
     //XNameAccess
diff --git a/sc/source/ui/vba/vbaworksheets.cxx b/sc/source/ui/vba/vbaworksheets.cxx
index 2fabece..cf6ffcf 100644
--- a/sc/source/ui/vba/vbaworksheets.cxx
+++ b/sc/source/ui/vba/vbaworksheets.cxx
@@ -115,7 +115,7 @@ public:
     SheetCollectionHelper( const SheetMap& sMap ) : mSheetMap( sMap ), cachePos(mSheetMap.begin()) {}
     // XElementAccess
     virtual uno::Type SAL_CALL getElementType(  ) throw (uno::RuntimeException) { return  sheet::XSpreadsheet::static_type(0); }
-    virtual ::sal_Bool SAL_CALL hasElements(  ) throw (uno::RuntimeException) { return ( mSheetMap.size() > 0 ); }
+    virtual ::sal_Bool SAL_CALL hasElements(  ) throw (uno::RuntimeException) { return ( !mSheetMap.empty() ); }
     // XNameAcess 
     virtual uno::Any SAL_CALL getByName( const ::rtl::OUString& aName ) throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException)
     {
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index 08ccbfc..fb2506d 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -5277,7 +5277,7 @@ void ScGridWindow::UpdateCursorOverlay()
         }
     }
 
-    if ( aPixelRects.size() )
+    if ( !aPixelRects.empty() )
     {
         // #i70788# get the OverlayManager safely
         ::sdr::overlay::OverlayManager* pOverlayManager = getOverlayManager();


More information about the Libreoffice-commits mailing list