[Libreoffice-commits] core.git: vcl/inc
Julien Nabet (via logerrit)
logerrit at kemper.freedesktop.org
Thu Oct 15 05:17:11 UTC 2020
vcl/inc/impdel.hxx | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
New commits:
commit ce98648b85169fa0fb8b5d2de179b280a682bde0
Author: Julien Nabet <serval2412 at yahoo.fr>
AuthorDate: Sun Oct 11 13:15:38 2020 +0200
Commit: Julien Nabet <serval2412 at yahoo.fr>
CommitDate: Thu Oct 15 07:16:25 2020 +0200
Replace list by vector in vcl/impdel
Change-Id: I91f5859413ec3265647b8d55225b29ee95a06857
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104182
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412 at yahoo.fr>
diff --git a/vcl/inc/impdel.hxx b/vcl/inc/impdel.hxx
index 308872b9c9eb..62925c24a427 100644
--- a/vcl/inc/impdel.hxx
+++ b/vcl/inc/impdel.hxx
@@ -20,7 +20,8 @@
#ifndef INCLUDED_VCL_IMPDEL_HXX
#define INCLUDED_VCL_IMPDEL_HXX
-#include <list>
+#include <algorithm>
+#include <vector>
namespace vcl
{
@@ -29,7 +30,7 @@ class DeletionListener;
class DeletionNotifier
{
- std::list< DeletionListener* > m_aListeners;
+ std::vector< DeletionListener* > m_aListeners;
protected:
DeletionNotifier() {}
@@ -43,7 +44,7 @@ class DeletionNotifier
{ m_aListeners.push_back( pListener ); }
void removeDel( DeletionListener* pListener )
- { m_aListeners.remove( pListener ); }
+ { m_aListeners.erase(std::remove(m_aListeners.begin(), m_aListeners.end(), pListener), m_aListeners.end()); }
};
class DeletionListener
More information about the Libreoffice-commits
mailing list