From 7d08b0c3d7e1d4450bcb8a96abc7518c5a115917 Mon Sep 17 00:00:00 2001 From: staticfox Date: Sun, 31 Jul 2016 20:45:22 -0400 Subject: Part 1: Bring KVIrc to the 21st century Avoid many un-necessary memory allocations as well as start the migration to unique pointers where appropriate. Start migrating out of the KVirc standard library into the C++ standard library. --- src/modules/context/libkvicontext.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/modules/context/libkvicontext.cpp') diff --git a/src/modules/context/libkvicontext.cpp b/src/modules/context/libkvicontext.cpp index 8fa531894..186fce01c 100644 --- a/src/modules/context/libkvicontext.cpp +++ b/src/modules/context/libkvicontext.cpp @@ -469,9 +469,8 @@ static bool context_kvs_fnc_list(KviKvsModuleFunctionCall * c) { KviKvsArray * pArray = new KviKvsArray(); - KviPointerList * pWinList = g_pMainWindow->windowList(); int idx = 0; - for(KviWindow * pWnd = pWinList->first(); pWnd; pWnd = pWinList->next()) + for(auto pWnd : g_pMainWindow->windowList()) { if(pWnd->type() == KviWindow::Console) { -- cgit v1.3.1-10-gc9f91