Replace more strcmp with std::string::compare or std::string::operator==.

This commit also enables TinyXML STL support.
This commit is contained in:
Tobias Loose
2013-11-23 11:10:41 +01:00
parent 5d0d130587
commit 9d5a83d588
13 changed files with 63 additions and 59 deletions

View File

@@ -1145,7 +1145,7 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG
}
if(strncmp(s.c_str(), "chooseacolor ", strlen("chooseacolor ")) == 0 || strncmp(s.c_str(), "chooseatype ", strlen("chooseatype ")) == 0)
if(s.compare(0, strlen("chooseacolor "), "chooseacolor ") == 0 || s.compare(0, strlen("chooseatype "), "chooseatype ") == 0)
{
MTGAbility * choose = parseChooseActionAbility(s,card,spell,target,0,id);
choose = NEW GenericActivatedAbility(observer, "","",id, card,choose,NULL);