From 56b40bc67acac917b1c9927bc7b934ab37151978 Mon Sep 17 00:00:00 2001 From: Niels Martin Hansen Date: Sun, 16 Aug 2009 03:50:41 +0000 Subject: [PATCH] Will GCC like me better if I sprinkle some 'typename' around? Originally committed to SVN as r3417. --- aegisub/src/block_cache.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/aegisub/src/block_cache.h b/aegisub/src/block_cache.h index 7a638b32d..7d9bd62ba 100644 --- a/aegisub/src/block_cache.h +++ b/aegisub/src/block_cache.h @@ -54,7 +54,7 @@ /// /// Custom block factories could use a large internally pre-allocated buffer to create the /// requested blocks in to avoid the default allocator. -template +template struct BasicDataBlockFactory { /// @brief Allocates a block and returns it /// @param i Index of the block to allocate @@ -96,9 +96,9 @@ struct BasicDataBlockFactory { /// @tparam MacroblockExponent Controls the number of blocks per macroblock, for tuning memory usage /// @tparam BlockFactoryT Type of block factory, see BasicDataBlockFactory class for detail on these template < - class BlockT, + typename BlockT, int MacroblockExponent = 6, - class BlockFactoryT = BasicDataBlockFactory + typename BlockFactoryT = BasicDataBlockFactory > class DataBlockCache { @@ -218,7 +218,7 @@ public: // Get a list of macro blocks sorted by access count std::vector access_data; access_data.reserve(data.size()); - for (MacroBlockArray::iterator mb = data.begin(); mb != data.end(); ++mb) + for (typename MacroBlockArray::iterator mb = data.begin(); mb != data.end(); ++mb) access_data.push_back(AccessData(&*mb)); std::sort(access_data.begin(), access_data.end());