From 95ce21d8512af00a4c5f607091a459b789f79b79 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 21 Feb 2018 18:30:20 +0300 Subject: mmap: C++'11 iterators --- plugins/Db3x_mmap/src/dbcache.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'plugins/Db3x_mmap/src/dbcache.cpp') diff --git a/plugins/Db3x_mmap/src/dbcache.cpp b/plugins/Db3x_mmap/src/dbcache.cpp index abfe6a099d..1196d4bceb 100644 --- a/plugins/Db3x_mmap/src/dbcache.cpp +++ b/plugins/Db3x_mmap/src/dbcache.cpp @@ -123,8 +123,7 @@ void CDb3Mmap::DBFill(DWORD ofs, int bytes) static VOID CALLBACK DoBufferFlushTimerProc(HWND, UINT, UINT_PTR idEvent, DWORD) { - for (int i = 0; i < g_Dbs.getCount(); i++) { - CDb3Mmap *db = g_Dbs[i]; + for (auto &db : g_Dbs) { if (db->m_flushBuffersTimerId != idEvent) continue; -- cgit v1.2.3