Restore XToString with *_INVALID (Profile uses it). Trying a different fix.

This commit is contained in:
Chris Danford
2005-04-09 11:29:18 +00:00
parent 7d31a0b2bb
commit e1bc16930a
+6 -1
View File
@@ -35,10 +35,15 @@ static inline void enum_add( T &val, int iAmt )
#define FOREACH_ENUM( e, max, var ) for( e var=(e)0; var<max; enum_add<e>( var, +1 ) )
static const CString EMPTY_STRING;
#define XToString(X, CNT) \
const CString& X##ToString( X x ) \
{ \
ASSERT(unsigned(x) < CNT); \
if( x == CNT+1 ) \
return EMPTY_STRING; \
ASSERT( x < CNT ); \
ASSERT( x < (int)ARRAYSIZE(X##Names) ); \
return X##Names[x]; \
}