From be7cf3d347036cb1d0e85c894c04a18f256e1bd5 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Wed, 27 Sep 2006 05:25:22 +0000 Subject: [PATCH] FOREACH_ENUM2 --- stepmania/src/EnumHelper.h | 4 ++-- stepmania/src/NetworkSyncManager.h | 2 +- stepmania/src/RageInputDevice.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/stepmania/src/EnumHelper.h b/stepmania/src/EnumHelper.h index 8843ca40c4..489638d219 100644 --- a/stepmania/src/EnumHelper.h +++ b/stepmania/src/EnumHelper.h @@ -126,7 +126,7 @@ static void Lua##X(lua_State* L) \ { \ /* Create the EnumToString table: { "UnlockEntry_ArcadePoints", "UnlockEntry_DancePoints" } */ \ lua_newtable( L ); \ - FOREACH_ENUM( X, NUM_##X, i ) \ + FOREACH_ENUM2( X, i ) \ { \ RString s = X##Names[i]; \ lua_pushstring( L, (#X "_")+s ); \ @@ -137,7 +137,7 @@ static void Lua##X(lua_State* L) \ lua_setglobal( L, #X ); \ /* Create the StringToEnum table: { "UnlockEntry_ArcadePoints" = 0, "UnlockEntry_DancePoints" = 1 } */ \ lua_newtable( L ); \ - FOREACH_ENUM( X, NUM_##X, i ) \ + FOREACH_ENUM2( X, i ) \ { \ RString s = X##Names[i]; \ lua_pushstring( L, (#X "_")+s ); \ diff --git a/stepmania/src/NetworkSyncManager.h b/stepmania/src/NetworkSyncManager.h index 5ae6a64e5c..951d526dd9 100644 --- a/stepmania/src/NetworkSyncManager.h +++ b/stepmania/src/NetworkSyncManager.h @@ -53,7 +53,7 @@ enum NSScoreBoardColumn NUM_NSScoreBoardColumn, NSScoreBoardColumn_Invalid }; -#define FOREACH_NSScoreBoardColumn( sc ) FOREACH_ENUM( NSScoreBoardColumn, NUM_NSScoreBoardColumn, sc ) +#define FOREACH_NSScoreBoardColumn( sc ) FOREACH_ENUM2( NSScoreBoardColumn, sc ) struct NetServerInfo { diff --git a/stepmania/src/RageInputDevice.h b/stepmania/src/RageInputDevice.h index 89e989b0e1..b3133df8b5 100644 --- a/stepmania/src/RageInputDevice.h +++ b/stepmania/src/RageInputDevice.h @@ -49,7 +49,7 @@ enum InputDevice NUM_InputDevice, // leave this at the end InputDevice_Invalid // means this is NULL }; -#define FOREACH_InputDevice( i ) FOREACH_ENUM( InputDevice, NUM_InputDevice, i ) +#define FOREACH_InputDevice( i ) FOREACH_ENUM2( InputDevice, i ) const RString& InputDeviceToString( InputDevice i ); InputDevice StringToInputDevice( const RString& s ); inline bool IsJoystick( InputDevice id ) { return DEVICE_JOY1 <= id && id < DEVICE_JOY1+NUM_JOYSTICKS; }