Eliminated some spurious string copy construction - changed a couple string return functions to return a reference instead.

This commit is contained in:
wrenczes@gmail.com
2011-01-11 09:32:23 +00:00
parent 85bd7aa145
commit ccd972ada3
2 changed files with 4 additions and 4 deletions

View File

@@ -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);

View File

@@ -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;
}