diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2023-11-18 21:22:57 +0100 |
---|---|---|
committer | Julien Nabet <serval2412@yahoo.fr> | 2023-11-19 13:41:20 +0100 |
commit | 7ad4641e79169e297a88ee9e62e9be3d74f7124e (patch) | |
tree | c3ea804d27ddac54bf8d9e434be6d7843050ee6a /sc/source/ui/unoobj/viewuno.cxx | |
parent | f566a73adcf170d103b0561c7ea2871596af7142 (diff) |
c++20: use std::erase(_if) instead of std::remove(_if)+erase (part 8)
Change-Id: Ia726fbbfd3f08eb4bb5c7ccaf10d65fe01ca6585
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159639
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Diffstat (limited to 'sc/source/ui/unoobj/viewuno.cxx')
-rw-r--r-- | sc/source/ui/unoobj/viewuno.cxx | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/sc/source/ui/unoobj/viewuno.cxx b/sc/source/ui/unoobj/viewuno.cxx index e9b6c31fe70b..9304d72471d9 100644 --- a/sc/source/ui/unoobj/viewuno.cxx +++ b/sc/source/ui/unoobj/viewuno.cxx @@ -1343,9 +1343,7 @@ void SAL_CALL ScTabViewObj::removeEnhancedMouseClickHandler( const uno::Referenc { SolarMutexGuard aGuard; sal_uInt16 nCount = aMouseClickHandlers.size(); - aMouseClickHandlers.erase( - std::remove(aMouseClickHandlers.begin(), aMouseClickHandlers.end(), aListener), - aMouseClickHandlers.end()); + std::erase(aMouseClickHandlers, aListener); if (aMouseClickHandlers.empty() && (nCount > 0)) // only if last listener removed EndMouseListening(); } @@ -1366,9 +1364,7 @@ void SAL_CALL ScTabViewObj::removeActivationEventListener( const uno::Reference< { SolarMutexGuard aGuard; sal_uInt16 nCount = aActivationListeners.size(); - aActivationListeners.erase( - std::remove(aActivationListeners.begin(), aActivationListeners.end(), aListener), - aActivationListeners.end()); + std::erase(aActivationListeners, aListener); if (aActivationListeners.empty() && (nCount > 0)) // only if last listener removed EndActivationListening(); } |