Eliminated some spurious string copy construction - changed a couple string return functions to return a reference instead.
This commit is contained in:
@@ -49,8 +49,8 @@ class CardPrimitive {
|
||||
void addMagicText(string value, string zone);
|
||||
|
||||
void setName(const string& value);
|
||||
const string getName() const;
|
||||
const string getLCName() const;
|
||||
const string& getName() const;
|
||||
const string& getLCName() const;
|
||||
|
||||
void addType(char * type_text);
|
||||
void addType(int id);
|
||||
|
||||
@@ -231,12 +231,12 @@ void CardPrimitive::setName(const string& value)
|
||||
Subtypes::subtypesList->find(lcname);
|
||||
}
|
||||
|
||||
const string CardPrimitive::getName() const
|
||||
const string& CardPrimitive::getName() const
|
||||
{
|
||||
return name;
|
||||
}
|
||||
|
||||
const string CardPrimitive::getLCName() const
|
||||
const string& CardPrimitive::getLCName() const
|
||||
{
|
||||
return lcname;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user