From 2a81fc0ee9478758f7a919519f922f0d4cb5f279 Mon Sep 17 00:00:00 2001 From: Julien Nabet Date: Sun, 27 Sep 2020 12:48:02 +0200 Subject: Replace list by vector in vcl/Qt5VirtualDevice Change-Id: I137019c15d3ee2886ad1bd53e671a89990891481 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103506 Tested-by: Jenkins Reviewed-by: Julien Nabet --- vcl/inc/qt5/Qt5VirtualDevice.hxx | 4 ++-- vcl/qt5/Qt5VirtualDevice.cxx | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/vcl/inc/qt5/Qt5VirtualDevice.hxx b/vcl/inc/qt5/Qt5VirtualDevice.hxx index 89251c96d783..ad0dc3c3c804 100644 --- a/vcl/inc/qt5/Qt5VirtualDevice.hxx +++ b/vcl/inc/qt5/Qt5VirtualDevice.hxx @@ -22,7 +22,7 @@ #include #include -#include +#include #include @@ -32,7 +32,7 @@ enum class DeviceFormat; class Qt5VirtualDevice final : public SalVirtualDevice { - std::list m_aGraphics; + std::vector m_aGraphics; std::unique_ptr m_pImage; DeviceFormat m_eFormat; QSize m_aFrameSize; diff --git a/vcl/qt5/Qt5VirtualDevice.cxx b/vcl/qt5/Qt5VirtualDevice.cxx index f1c7d9606c8f..10b2066ccbf6 100644 --- a/vcl/qt5/Qt5VirtualDevice.cxx +++ b/vcl/qt5/Qt5VirtualDevice.cxx @@ -40,7 +40,9 @@ SalGraphics* Qt5VirtualDevice::AcquireGraphics() void Qt5VirtualDevice::ReleaseGraphics(SalGraphics* pGraphics) { - m_aGraphics.remove(dynamic_cast(pGraphics)); + m_aGraphics.erase( + std::remove(m_aGraphics.begin(), m_aGraphics.end(), dynamic_cast(pGraphics)), + m_aGraphics.end()); delete pGraphics; } -- cgit