summaryrefslogtreecommitdiff
path: root/vcl/qt5
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2023-11-19 21:48:56 +0100
committerJulien Nabet <serval2412@yahoo.fr>2023-11-20 07:40:57 +0100
commit63d676e7557f2b63d8f2df6573e3b4af5bb46cb0 (patch)
tree60a3a80fae29acf2cd56c34ee5ff9b7a856dcf44 /vcl/qt5
parent75f6a86ad924661f19c504380d96659e6b7d8afe (diff)
c++20: use std::erase(_if) instead of std::remove(_if)+erase (vcl)
Change-Id: Ie9bb9ce20f27162bcb7d7d25dcad99107675e2be Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159709 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Diffstat (limited to 'vcl/qt5')
-rw-r--r--vcl/qt5/QtClipboard.cxx3
-rw-r--r--vcl/qt5/QtDragAndDrop.cxx3
-rw-r--r--vcl/qt5/QtVirtualDevice.cxx4
3 files changed, 3 insertions, 7 deletions
diff --git a/vcl/qt5/QtClipboard.cxx b/vcl/qt5/QtClipboard.cxx
index 6e73b3711799..e9eb476fb253 100644
--- a/vcl/qt5/QtClipboard.cxx
+++ b/vcl/qt5/QtClipboard.cxx
@@ -216,8 +216,7 @@ void QtClipboard::removeClipboardListener(
const css::uno::Reference<css::datatransfer::clipboard::XClipboardListener>& listener)
{
osl::MutexGuard aGuard(m_aMutex);
- m_aListeners.erase(std::remove(m_aListeners.begin(), m_aListeners.end(), listener),
- m_aListeners.end());
+ std::erase(m_aListeners, listener);
}
bool QtClipboard::isSupported(const QClipboard::Mode aMode)
diff --git a/vcl/qt5/QtDragAndDrop.cxx b/vcl/qt5/QtDragAndDrop.cxx
index 0148715e237b..ffabc1bbbaaa 100644
--- a/vcl/qt5/QtDragAndDrop.cxx
+++ b/vcl/qt5/QtDragAndDrop.cxx
@@ -171,8 +171,7 @@ void QtDropTarget::removeDropTargetListener(
{
::osl::Guard<::osl::Mutex> aGuard(m_aMutex);
- m_aListeners.erase(std::remove(m_aListeners.begin(), m_aListeners.end(), xListener),
- m_aListeners.end());
+ std::erase(m_aListeners, xListener);
}
sal_Bool QtDropTarget::isActive() { return m_bActive; }
diff --git a/vcl/qt5/QtVirtualDevice.cxx b/vcl/qt5/QtVirtualDevice.cxx
index 7e0dbab873d4..22844f1df6ab 100644
--- a/vcl/qt5/QtVirtualDevice.cxx
+++ b/vcl/qt5/QtVirtualDevice.cxx
@@ -39,9 +39,7 @@ SalGraphics* QtVirtualDevice::AcquireGraphics()
void QtVirtualDevice::ReleaseGraphics(SalGraphics* pGraphics)
{
- m_aGraphics.erase(
- std::remove(m_aGraphics.begin(), m_aGraphics.end(), dynamic_cast<QtGraphics*>(pGraphics)),
- m_aGraphics.end());
+ std::erase(m_aGraphics, dynamic_cast<QtGraphics*>(pGraphics));
delete pGraphics;
}