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

Michaël Lefèvre lefevre00 at yahoo.fr
Fri Mar 13 04:51:13 PDT 2015


 sw/source/uibase/app/swwait.cxx |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

New commits:
commit 0845cdbdaedd7f556c471399c3bbc76d5cafffd2
Author: Michaël Lefèvre <lefevre00 at yahoo.fr>
Date:   Thu Mar 12 22:32:54 2015 +0100

    CppCheck cleaning : redundant checking of elemet existence
    
    Change-Id: I141b488b0067f8c6eaa54bdc9d42b4a44cfe3907
    Reviewed-on: https://gerrit.libreoffice.org/14849
    Tested-by: Michael Stahl <mstahl at redhat.com>
    Reviewed-by: Michael Stahl <mstahl at redhat.com>

diff --git a/sw/source/uibase/app/swwait.cxx b/sw/source/uibase/app/swwait.cxx
index 01647c6..10a49d6 100644
--- a/sw/source/uibase/app/swwait.cxx
+++ b/sw/source/uibase/app/swwait.cxx
@@ -70,9 +70,8 @@ void SwWait::LeaveWaitAndUnlockDispatcher()
         {
             // only unlock dispatchers which had been locked
             SfxDispatcher* pDispatcher = pFrame->GetDispatcher();
-            if ( mpLockedDispatchers.find( pDispatcher ) != mpLockedDispatchers.end() )
+            if ( mpLockedDispatchers.erase( pDispatcher ) )
             {
-                mpLockedDispatchers.erase( pDispatcher );
                 pDispatcher->Lock( false );
             }
         }


More information about the Libreoffice-commits mailing list