summaryrefslogtreecommitdiff
path: root/src/textcommand.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-09-04 19:11:53 +0300
committerAndrei Karas <akaras@inbox.ru>2012-09-04 19:11:53 +0300
commit3a407bb6b73a186eafd99bcec570f88097c4b2e1 (patch)
treeea57a752c348ba0a883294855ad3c62c16e9749d /src/textcommand.h
parent872fc368f7b253f26714fc47323064f270b62b40 (diff)
downloadplus-3a407bb6b73a186eafd99bcec570f88097c4b2e1.tar.gz
plus-3a407bb6b73a186eafd99bcec570f88097c4b2e1.tar.bz2
plus-3a407bb6b73a186eafd99bcec570f88097c4b2e1.tar.xz
plus-3a407bb6b73a186eafd99bcec570f88097c4b2e1.zip
Add const to more classes.
Diffstat (limited to 'src/textcommand.h')
-rw-r--r--src/textcommand.h31
1 files changed, 17 insertions, 14 deletions
diff --git a/src/textcommand.h b/src/textcommand.h
index 8a46d73ba..f9b44253b 100644
--- a/src/textcommand.h
+++ b/src/textcommand.h
@@ -61,21 +61,24 @@ class TextCommand
/**
* Constructor.
*/
- TextCommand(unsigned int id, std::string symbol, std::string command,
- std::string comment, SpellTarget type, std::string icon,
- unsigned int basicLvl, MagicSchool school = SKILL_MAGIC,
- unsigned int schoolLvl = 0, int mana = 0);
+ TextCommand(const unsigned int id, const std::string &symbol,
+ const std::string &command,
+ const std::string &comment, const SpellTarget type,
+ const std::string &icon, const unsigned int basicLvl,
+ const MagicSchool school = SKILL_MAGIC,
+ const unsigned int schoolLvl = 0, const int mana = 0);
/**
* Constructor.
*/
- TextCommand(unsigned int id, std::string symbol, std::string command,
- std::string comment, SpellTarget type, std::string icon);
+ TextCommand(const unsigned int id, const std::string &symbol,
+ const std::string &command, const std::string &comment,
+ const SpellTarget type, const std::string &icon);
/**
* Constructor.
*/
- TextCommand(unsigned int id);
+ TextCommand(const unsigned int id);
/**
* Destructor.
@@ -127,28 +130,28 @@ class TextCommand
void setSymbol(std::string symbol)
{ mSymbol = symbol; }
- void setId(unsigned int id)
+ void setId(const unsigned int id)
{ mId = id; }
- void setTargetType(SpellTarget targetType)
+ void setTargetType(const SpellTarget targetType)
{ mTargetType = targetType; }
void setIcon(std::string icon)
{ mIcon = icon; loadImage(); }
- void setMana(unsigned int mana)
+ void setMana(const unsigned int mana)
{ mMana = mana; }
- void setSchool(MagicSchool school)
+ void setSchool(const MagicSchool school)
{ mSchool = school; }
- void setBaseLvl(unsigned int baseLvl)
+ void setBaseLvl(const unsigned int baseLvl)
{ mBaseLvl = baseLvl; }
- void setSchoolLvl(unsigned int schoolLvl)
+ void setSchoolLvl(const unsigned int schoolLvl)
{ mSchoolLvl = schoolLvl; }
- void setCommandType(TextCommandType commandType)
+ void setCommandType(const TextCommandType commandType)
{ mCommandType = commandType; }
bool isEmpty() const