diff options
| author | 2016-08-07 12:36:20 -0400 | |
|---|---|---|
| committer | 2016-08-07 23:12:47 -0400 | |
| commit | 738447426896b1bdc24bf85532fa2452d462189e (patch) | |
| tree | 388b61efaf7605dfb0680612bd5f2209f7f3f125 /src/modules/socketspy/SocketSpyWindow.cpp | |
| parent | KviKvsAsyncOperation: Move to unordered_set (diff) | |
| download | KVIrc-738447426896b1bdc24bf85532fa2452d462189e.tar.gz KVIrc-738447426896b1bdc24bf85532fa2452d462189e.tar.bz2 KVIrc-738447426896b1bdc24bf85532fa2452d462189e.zip | |
SocketSpy: Move to unordered_set
Diffstat (limited to 'src/modules/socketspy/SocketSpyWindow.cpp')
| -rw-r--r-- | src/modules/socketspy/SocketSpyWindow.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/modules/socketspy/SocketSpyWindow.cpp b/src/modules/socketspy/SocketSpyWindow.cpp index ef213a874..47edbd4a0 100644 --- a/src/modules/socketspy/SocketSpyWindow.cpp +++ b/src/modules/socketspy/SocketSpyWindow.cpp @@ -31,12 +31,14 @@ #include "KviLocale.h" #include "KviConsoleWindow.h" -extern KviPointerList<SocketSpyWindow> * g_pSocketSpyWindowList; +#include <unordered_set> + +extern std::unordered_set<SocketSpyWindow *> g_pSocketSpyWindowList; SocketSpyWindow::SocketSpyWindow(KviConsoleWindow * lpConsole) : KviWindow(KviWindow::SocketSpy, "socket_spy", lpConsole), KviIrcDataStreamMonitor(lpConsole->context()) { - g_pSocketSpyWindowList->append(this); + g_pSocketSpyWindowList.insert(this); m_pSplitter = new KviTalSplitter(Qt::Horizontal, this); setObjectName("spysocket_splitter"); m_pIrcView = new KviIrcView(m_pSplitter, this); @@ -46,7 +48,7 @@ SocketSpyWindow::SocketSpyWindow(KviConsoleWindow * lpConsole) SocketSpyWindow::~SocketSpyWindow() { - g_pSocketSpyWindowList->removeRef(this); + g_pSocketSpyWindowList.erase(this); } void SocketSpyWindow::die() |
