From 2774b7434835f9e9b3bb88e661ee94b464e1051a Mon Sep 17 00:00:00 2001 From: Ben Anderson Date: Fri, 18 Mar 2005 00:55:21 +0000 Subject: [PATCH] Fix compilation on GCC. I don't know why this works, it just does. (I tested it. --- stepmania/src/ThemeMetric.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/stepmania/src/ThemeMetric.h b/stepmania/src/ThemeMetric.h index 575ef36901..d59af71aa2 100644 --- a/stepmania/src/ThemeMetric.h +++ b/stepmania/src/ThemeMetric.h @@ -4,8 +4,8 @@ #define THEME_METRIC_H #include "ThemeManager.h" -#include "Foreach.h" #include +#include "Foreach.h" class IThemeMetric { @@ -174,12 +174,16 @@ public: } void Read() { - FOREACHM( CString, ThemeMetricT, m_metric, m ) + // HACK: GCC (3.4) takes this and pretty much nothing else. + // I don't know why. + for( typename map >::iterator m = m_metric.begin(); m != m_metric.end(); ++m ) m->second.Read(); } const T& GetValue( CString s ) const { - map::const_iterator iter = m_metric.find(s); + // HACK: GCC (3.4) takes this and pretty much nothing else. + // I don't know why. + typename map >::const_iterator iter = m_metric.find(s); ASSERT( iter != m_metric.end() ); return iter->second.GetValue(); }