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

Julien Nabet serval2412 at yahoo.fr
Sun Sep 4 09:59:39 UTC 2016


 cui/source/dialogs/screenshotannotationdlg.cxx |    6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

New commits:
commit aaea58f49085184830ef8f55329827a931f9cea8
Author: Julien Nabet <serval2412 at yahoo.fr>
Date:   Sun Sep 4 09:28:51 2016 +0200

    cppcheck: redundantIfRemove
    
    Change-Id: I8576c5042265399de6d9c72ffd67bce0fb256923
    Reviewed-on: https://gerrit.libreoffice.org/28661
    Reviewed-by: Noel Grandin <noelgrandin at gmail.com>
    Tested-by: Noel Grandin <noelgrandin at gmail.com>

diff --git a/cui/source/dialogs/screenshotannotationdlg.cxx b/cui/source/dialogs/screenshotannotationdlg.cxx
index fff5ba8..4c13a28 100644
--- a/cui/source/dialogs/screenshotannotationdlg.cxx
+++ b/cui/source/dialogs/screenshotannotationdlg.cxx
@@ -533,11 +533,7 @@ IMPL_LINK_TYPED(ScreenshotAnnotationDlg_Impl, pictureFrameListener, VclWindowEve
             {
                 if (mpPicture->IsMouseOver() && mpHilighted)
                 {
-                    if (maSelected.find(mpHilighted) != maSelected.end())
-                    {
-                        maSelected.erase(mpHilighted);
-                    }
-                    else
+                    if (maSelected.erase(mpHilighted) == 0)
                     {
                         maSelected.insert(mpHilighted);
                     }


More information about the Libreoffice-commits mailing list