Let ActorCommand do the parsing for ModeChoice

This commit is contained in:
Chris Danford
2004-12-02 05:56:38 +00:00
parent 061fbb276a
commit e1da21f61c
13 changed files with 54 additions and 41 deletions
+3 -3
View File
@@ -54,16 +54,16 @@ CString ActorCommand::GetOriginalCommandString() const
void ParseActorCommands( const CString &sCommands, ActorCommands &vCommandsOut )
{
vCommandsOut.clear();
vCommandsOut.v.clear();
CStringArray vsCommands;
split( sCommands, ";", vsCommands, true ); // do ignore empty
vCommandsOut.resize( vsCommands.size() );
vCommandsOut.v.resize( vsCommands.size() );
for( unsigned i=0; i<vsCommands.size(); i++ )
{
const CString &sCommand = vsCommands[i];
ActorCommand &pc = vCommandsOut[i];
ActorCommand &pc = vCommandsOut.v[i];
pc.Set( sCommand );
}
}