diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-09-04 19:11:53 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-09-04 19:11:53 +0300 |
commit | 3a407bb6b73a186eafd99bcec570f88097c4b2e1 (patch) | |
tree | ea57a752c348ba0a883294855ad3c62c16e9749d /src/textcommand.cpp | |
parent | 872fc368f7b253f26714fc47323064f270b62b40 (diff) | |
download | manaplus-3a407bb6b73a186eafd99bcec570f88097c4b2e1.tar.gz manaplus-3a407bb6b73a186eafd99bcec570f88097c4b2e1.tar.bz2 manaplus-3a407bb6b73a186eafd99bcec570f88097c4b2e1.tar.xz manaplus-3a407bb6b73a186eafd99bcec570f88097c4b2e1.zip |
Add const to more classes.
Diffstat (limited to 'src/textcommand.cpp')
-rw-r--r-- | src/textcommand.cpp | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/src/textcommand.cpp b/src/textcommand.cpp index 75dcab044..e0153f163 100644 --- a/src/textcommand.cpp +++ b/src/textcommand.cpp @@ -33,11 +33,12 @@ #include "debug.h" -TextCommand::TextCommand(unsigned int id, std::string symbol, - std::string command, std::string comment, - SpellTarget type, std::string icon, - unsigned int basicLvl, MagicSchool school, - unsigned int schoolLvl, int mana) : +TextCommand::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, + const unsigned int schoolLvl, const int mana) : mCommand(command), mComment(comment), mSymbol(symbol), @@ -55,9 +56,10 @@ TextCommand::TextCommand(unsigned int id, std::string symbol, } -TextCommand::TextCommand(unsigned int id, std::string symbol, - std::string command, std::string comment, - SpellTarget type, std::string icon) : +TextCommand::TextCommand(const unsigned int id, const std::string &symbol, + const std::string &command, + const std::string &comment, + const SpellTarget type, const std::string &icon) : mCommand(command), mComment(comment), mSymbol(symbol), @@ -74,7 +76,7 @@ TextCommand::TextCommand(unsigned int id, std::string symbol, loadImage(); } -TextCommand::TextCommand(unsigned int id) : +TextCommand::TextCommand(const unsigned int id) : mCommand(""), mComment(""), mSymbol(""), @@ -112,7 +114,7 @@ void TextCommand::loadImage() if (getIcon().empty()) return; - ResourceManager *resman = ResourceManager::getInstance(); + ResourceManager *const resman = ResourceManager::getInstance(); SpriteDisplay display = ItemDB::get(getIcon()).getDisplay(); mImage = resman->getImage(paths.getStringValue("itemIcons") + display.image); |