[Libreoffice-commits] .: autodoc/source odk/source

Julien Nabet serval2412 at kemper.freedesktop.org
Sun May 8 05:54:49 PDT 2011


 autodoc/source/ary/idl/ia_type.cxx            |    2 +-
 autodoc/source/display/idl/hfi_doc.cxx        |    2 +-
 autodoc/source/display/idl/hfi_typetext.cxx   |    2 +-
 autodoc/source/exes/adc_uni/adc_cmd_parse.cxx |    2 +-
 odk/source/unoapploader/unx/unoapploader.c    |    3 +--
 5 files changed, 5 insertions(+), 6 deletions(-)

New commits:
commit 64307a91fcf9ebb84ede8f08d991e22a5789304a
Author: Julien Nabet <serval2412 at yahoo.fr>
Date:   Sun May 8 14:54:29 2011 +0200

    Some cppcheck cleaning

diff --git a/autodoc/source/ary/idl/ia_type.cxx b/autodoc/source/ary/idl/ia_type.cxx
index 2caa0d7..57c853a 100644
--- a/autodoc/source/ary/idl/ia_type.cxx
+++ b/autodoc/source/ary/idl/ia_type.cxx
@@ -127,7 +127,7 @@ TypeAdmin::lhf_CheckIn_TypeName( const String &        i_sLocalName,
 {
     String sSearchLocalName( i_sLocalName );
     if ( i_templateParameters != 0
-         ?  i_templateParameters->size() > 0
+         ?  (!i_templateParameters->empty())
          :  false )
     {
         sSearchLocalName = MakeTemplateName(
diff --git a/autodoc/source/display/idl/hfi_doc.cxx b/autodoc/source/display/idl/hfi_doc.cxx
index 07ee3db..017e022 100644
--- a/autodoc/source/display/idl/hfi_doc.cxx
+++ b/autodoc/source/display/idl/hfi_doc.cxx
@@ -165,7 +165,7 @@ HF_IdlDocu::Produce_byDocuAndScope( const ce_info & i_rDocu,
         }
     }   // end for
 
-    if (aSeeAlsosWithoutText.size() > 0)
+    if (!aSeeAlsosWithoutText.empty())
     {
         HF_IdlTag
             aSeeAlsoTag(Env(),  i_rScopeGivingCe);
diff --git a/autodoc/source/display/idl/hfi_typetext.cxx b/autodoc/source/display/idl/hfi_typetext.cxx
index fd96d0a..e817144 100644
--- a/autodoc/source/display/idl/hfi_typetext.cxx
+++ b/autodoc/source/display/idl/hfi_typetext.cxx
@@ -740,7 +740,7 @@ void
 HF_IdlTypeText::write_TemplateParameterList(
                     const std::vector<ary::idl::Type_id> & i_templateParameters ) const
 {
-    if (i_templateParameters.size() == 0)
+    if (i_templateParameters.empty())
         return;
 
     HF_IdlTypeText
diff --git a/autodoc/source/exes/adc_uni/adc_cmd_parse.cxx b/autodoc/source/exes/adc_uni/adc_cmd_parse.cxx
index 2ce39cb..1077c9c 100644
--- a/autodoc/source/exes/adc_uni/adc_cmd_parse.cxx
+++ b/autodoc/source/exes/adc_uni/adc_cmd_parse.cxx
@@ -220,7 +220,7 @@ void
 Parse::do_clDefaultProject( opt_iter &    it,
                             opt_iter      itEnd )
 {
-    if ( aProjects.size() > 0 )
+    if ( !aProjects.empty() )
     {
         throw X_CommandLine( "Both, named projects and a default project, cannot be used together." );
     }
diff --git a/odk/source/unoapploader/unx/unoapploader.c b/odk/source/unoapploader/unx/unoapploader.c
index 3ea8f88..72c6665 100644
--- a/odk/source/unoapploader/unx/unoapploader.c
+++ b/odk/source/unoapploader/unx/unoapploader.c
@@ -267,7 +267,6 @@ char* createCommandName( char* argv0 )
 #ifndef AIX
     Dl_info dl_info;
 #endif
-    int pos;
 
     /* get the executable file name from argv0 */
     prgname = argv0;
@@ -293,7 +292,7 @@ char* createCommandName( char* argv0 )
         sep = strrchr( prgname, SEPARATOR );
         if ( sep != NULL )
         {
-            pos = ++sep - prgname;
+            int pos = ++sep - prgname;
             strncpy( cmdname, prgname, pos ); 
             cmdname[ pos ] = '\0';
             strcat( cmdname, CMDPREFIX );


More information about the Libreoffice-commits mailing list