diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2020-09-27 12:48:02 +0200 |
---|---|---|
committer | Julien Nabet <serval2412@yahoo.fr> | 2020-09-27 16:17:04 +0200 |
commit | 2a81fc0ee9478758f7a919519f922f0d4cb5f279 (patch) | |
tree | 4417ddc14881ba395d637886d5a1d1254b1a65c6 | |
parent | d3a8fdf3cad0e71ff5e13bb229fed6e52206c6b9 (diff) |
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 <serval2412@yahoo.fr>
-rw-r--r-- | vcl/inc/qt5/Qt5VirtualDevice.hxx | 4 | ||||
-rw-r--r-- | 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 <salvd.hxx> #include <memory> -#include <list> +#include <vector> #include <QtCore/QSize> @@ -32,7 +32,7 @@ enum class DeviceFormat; class Qt5VirtualDevice final : public SalVirtualDevice { - std::list<Qt5Graphics*> m_aGraphics; + std::vector<Qt5Graphics*> m_aGraphics; std::unique_ptr<QImage> 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<Qt5Graphics*>(pGraphics)); + m_aGraphics.erase( + std::remove(m_aGraphics.begin(), m_aGraphics.end(), dynamic_cast<Qt5Graphics*>(pGraphics)), + m_aGraphics.end()); delete pGraphics; } |