From 738447426896b1bdc24bf85532fa2452d462189e Mon Sep 17 00:00:00 2001 From: staticfox Date: Sun, 7 Aug 2016 12:36:20 -0400 Subject: SocketSpy: Move to unordered_set --- src/modules/socketspy/SocketSpyWindow.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/modules/socketspy/SocketSpyWindow.cpp') 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 * g_pSocketSpyWindowList; +#include + +extern std::unordered_set 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() -- cgit v1.3.1-10-gc9f91