StepsTypeToString should return "Foo_Bar", not "StepsType_Foo_Bar"

This commit is contained in:
Chris Danford
2007-02-09 03:24:11 +00:00
parent 35df8821ca
commit 142157e147
+2 -2
View File
@@ -36,14 +36,14 @@ LuaXType( RadarCategory );
RString StepsTypeToString( StepsType st ) RString StepsTypeToString( StepsType st )
{ {
RString s = GAMEMAN->StepsTypeToString( st ); RString s = GAMEMAN->StepsTypeToString( st );
/* foo-bar -> StepsType_Foo_Bar */ /* foo-bar -> Foo_Bar */
s.Replace('-','_'); s.Replace('-','_');
for( size_t i = 0; i < s.size(); ++i ) for( size_t i = 0; i < s.size(); ++i )
{ {
if( i == 0 || s[i-1] == '_' ) if( i == 0 || s[i-1] == '_' )
s[i] = toupper( s[i] ); s[i] = toupper( s[i] );
} }
return "StepsType_"+s; return s;
} }
LuaXType( StepsType ); LuaXType( StepsType );