StdString::Mid is string::substr (but this is cleaner).

This commit is contained in:
Glenn Maynard
2005-04-23 03:54:22 +00:00
parent bdfdba0917
commit d0eea6fb5c
+1 -4
View File
@@ -393,10 +393,7 @@ void ActorUtil::LoadAllCommands( Actor& actor, const CString &sType )
const CString &sv = *v;
if( sv.Right(7) == "Command" )
{
// Ugh. Where did StdString::Mid go?
CString sCommandName = sv;
sCommandName = sCommandName.Left( sCommandName.size()-7 ); // strip off "Command"
sCommandName = sCommandName.Right( sCommandName.size()-actor.GetID().size() ); // strip off actor ID
CString sCommandName( sv.begin()+actor.GetID().size(), sv.end()-7 );
LoadCommand( actor, sType, sCommandName );
}
}