Substitute more char arrays with strings

This commit is contained in:
Tobias Loose
2013-11-23 12:57:31 +01:00
parent 3f0dd987f0
commit 9ee44ca091
22 changed files with 61 additions and 50 deletions
+4 -4
View File
@@ -254,22 +254,22 @@ void MTGCardInstance::addType(int type)
SAFE_DELETE(e);
}
void MTGCardInstance::addType(char * type_text)
void MTGCardInstance::addType(const string& type_text)
{
setSubtype(type_text);
}
void MTGCardInstance::setType(const char * type_text)
void MTGCardInstance::setType(const string& type_text)
{
setSubtype(type_text);
}
void MTGCardInstance::setSubtype(string value)
void MTGCardInstance::setSubtype(const string& value)
{
int id = MTGAllCards::findType(value);
addType(id);
}
int MTGCardInstance::removeType(string value, int removeAll)
int MTGCardInstance::removeType(const string& value, int removeAll)
{
int id = MTGAllCards::findType(value);
return removeType(id, removeAll);