From 4526b0dc43d96839e9b6f85d47e285e74e453387 Mon Sep 17 00:00:00 2001 From: Niels Martin Hansen Date: Sun, 16 Aug 2009 04:31:29 +0000 Subject: [PATCH] Try to get around G++'s dislike of my iterators by using an integer index instead. Originally committed to SVN as r3419. --- aegisub/src/block_cache.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/aegisub/src/block_cache.h b/aegisub/src/block_cache.h index 7d9bd62ba..a2748f091 100644 --- a/aegisub/src/block_cache.h +++ b/aegisub/src/block_cache.h @@ -218,8 +218,9 @@ public: // Get a list of macro blocks sorted by access count std::vector access_data; access_data.reserve(data.size()); - for (typename MacroBlockArray::iterator mb = data.begin(); mb != data.end(); ++mb) - access_data.push_back(AccessData(&*mb)); + // For whatever reason, G++ pukes if I try using iterators here... + for (size_t mbi = 0; mbi != data.size(); ++mbi) + access_data.push_back(AccessData(&data[mbi])); std::sort(access_data.begin(), access_data.end()); // Sum up data size until we hit the max