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

Julien Nabet serval2412 at yahoo.fr
Sat Mar 22 15:09:49 PDT 2014


 sfx2/source/appl/shutdownicon.cxx |    9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

New commits:
commit 62407b674ef9866cf98366a1cbcb96b8062b8294
Author: Julien Nabet <serval2412 at yahoo.fr>
Date:   Sat Mar 22 23:08:18 2014 +0100

    cppcheck: fix variables reassigned before having been used
    
    Change-Id: I0b1025f2697e5cd7abfe5ca9e3c64f02469ba606

diff --git a/sfx2/source/appl/shutdownicon.cxx b/sfx2/source/appl/shutdownicon.cxx
index 524fdd2..51ab5d1 100644
--- a/sfx2/source/appl/shutdownicon.cxx
+++ b/sfx2/source/appl/shutdownicon.cxx
@@ -707,8 +707,7 @@ void SAL_CALL ShutdownIcon::initialize( const ::com::sun::star::uno::Sequence< :
     // third argument only sets veto, everything else will be ignored!
     if (aArguments.getLength() > 2)
     {
-        sal_Bool bVeto = sal_True;
-        bVeto = ::cppu::any2bool(aArguments[2]);
+        sal_Bool bVeto = ::cppu::any2bool(aArguments[2]);
         m_bVeto = bVeto;
         return;
     }
@@ -719,8 +718,7 @@ void SAL_CALL ShutdownIcon::initialize( const ::com::sun::star::uno::Sequence< :
         {
             try
             {
-                sal_Bool bQuickstart = sal_False;
-                bQuickstart = ::cppu::any2bool( aArguments[0] );
+                sal_Bool bQuickstart = ::cppu::any2bool( aArguments[0] );
                 if( !bQuickstart && !GetAutostart() )
                     return;
                 aGuard.clear();
@@ -740,8 +738,7 @@ void SAL_CALL ShutdownIcon::initialize( const ::com::sun::star::uno::Sequence< :
     }
     if ( aArguments.getLength() > 1 )
     {
-            sal_Bool bAutostart = sal_False;
-            bAutostart = ::cppu::any2bool( aArguments[1] );
+            sal_Bool bAutostart = ::cppu::any2bool( aArguments[1] );
             if (bAutostart && !GetAutostart())
                 SetAutostart( true );
             if (!bAutostart && GetAutostart())


More information about the Libreoffice-commits mailing list