[Libreoffice-commits] .: basic/source

Cédric Bosdonnat cbosdo at kemper.freedesktop.org
Fri Apr 22 02:52:25 PDT 2011


 basic/source/uno/dlgcont.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 32ecda2a45be5a7bf5b2d7a7dbc8b303a9f3622c
Author: Kayo Hamid <kayo.hamid at gekkolinux.com.br>
Date:   Fri Apr 22 11:31:09 2011 +0200

    cppcheck inefficient checking for emptiness
    
    From cppcheck: Using xxxx.empty() instead of xxxx.size() can be faster.
     xxxx.size() can take linear time but xxxx.empty() is guaranteed to take
     constant time

diff --git a/basic/source/uno/dlgcont.cxx b/basic/source/uno/dlgcont.cxx
index c8da150..f81a878 100644
--- a/basic/source/uno/dlgcont.cxx
+++ b/basic/source/uno/dlgcont.cxx
@@ -316,7 +316,7 @@ void SfxDialogLibraryContainer::storeLibrariesToStorage( const uno::Reference< e
                     ::xmlscript::importDialogModel( xInput, xDialogModel, xContext, mxOwnerDocument );
                     std::vector< rtl::OUString > vEmbeddedImageURLs;
                     lcl_deepInspectForEmbeddedImages( Reference< XInterface >( xDialogModel, UNO_QUERY ),  vEmbeddedImageURLs );
-                    if ( vEmbeddedImageURLs.size() )
+                    if ( !vEmbeddedImageURLs.empty() )
                     {
                         // Export the images to the storage
                         Sequence< Any > aArgs( 1 );


More information about the Libreoffice-commits mailing list