summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2016-09-04 09:28:51 +0200
committerNoel Grandin <noelgrandin@gmail.com>2016-09-04 09:59:17 +0000
commitaaea58f49085184830ef8f55329827a931f9cea8 (patch)
treed805c9f688a759a45b309a463217e1f4e7284ff4 /cui
parent4d0b71be75804dd2b008d3da932d620893fbd780 (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>
Diffstat (limited to 'cui')
-rw-r--r--cui/source/dialogs/screenshotannotationdlg.cxx6
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);
}