diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2016-09-04 09:28:51 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-09-04 09:59:17 +0000 |
commit | aaea58f49085184830ef8f55329827a931f9cea8 (patch) | |
tree | d805c9f688a759a45b309a463217e1f4e7284ff4 | |
parent | 4d0b71be75804dd2b008d3da932d620893fbd780 (diff) |
cppcheck: redundantIfRemove
Change-Id: I8576c5042265399de6d9c72ffd67bce0fb256923
Reviewed-on: https://gerrit.libreoffice.org/28661
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
-rw-r--r-- | cui/source/dialogs/screenshotannotationdlg.cxx | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/cui/source/dialogs/screenshotannotationdlg.cxx b/cui/source/dialogs/screenshotannotationdlg.cxx index fff5ba896c78..4c13a28ad2d0 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); } |