summaryrefslogtreecommitdiff
path: root/src/spellmanager.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-09-03 21:58:08 +0300
committerAndrei Karas <akaras@inbox.ru>2012-09-04 03:06:57 +0300
commit866a71ffd576fd10c4e309195016d86f0c8ed635 (patch)
tree21bbec175afc181cada529598267d62f12fcb671 /src/spellmanager.h
parentebecb0cf42f2066943908fa158ac91527e0e6629 (diff)
downloadmv-866a71ffd576fd10c4e309195016d86f0c8ed635.tar.gz
mv-866a71ffd576fd10c4e309195016d86f0c8ed635.tar.bz2
mv-866a71ffd576fd10c4e309195016d86f0c8ed635.tar.xz
mv-866a71ffd576fd10c4e309195016d86f0c8ed635.zip
Add const to more classes.
Diffstat (limited to 'src/spellmanager.h')
-rw-r--r--src/spellmanager.h24
1 files changed, 13 insertions, 11 deletions
diff --git a/src/spellmanager.h b/src/spellmanager.h
index c3abd829a..ebda6ec40 100644
--- a/src/spellmanager.h
+++ b/src/spellmanager.h
@@ -40,21 +40,21 @@ class SpellManager
~SpellManager();
- TextCommand *getSpell(int spellId);
+ TextCommand *getSpell(const int spellId);
- TextCommand* getSpellByItem(int itemId);
+ TextCommand* getSpellByItem(const int itemId);
- bool addSpell(TextCommand *spell);
+ bool addSpell(TextCommand *const spell);
- TextCommand *createNewSpell();
+ TextCommand *createNewSpell() const;
- std::vector<TextCommand*> getAll();
+ std::vector<TextCommand*> getAll() const;
- void useItem(int itemId);
+ void useItem(const int itemId);
- void invoke(int spellId);
+ void invoke(const int spellId);
- void load(bool oldConfig = false);
+ void load(const bool oldConfig = false);
void save();
@@ -63,11 +63,13 @@ class SpellManager
private:
void fillSpells();
- void invokeSpell(TextCommand* spell, Being* target) const;
+ void invokeSpell(const TextCommand *const spell,
+ Being *const target) const;
- void invokeSpell(TextCommand* spell) const;
+ void invokeSpell(const TextCommand *const spell) const;
- std::string parseCommand(std::string command, Being* target) const;
+ std::string parseCommand(std::string command,
+ const Being *const target) const;
std::map<unsigned int, TextCommand*> mSpells;
std::vector<TextCommand*> mSpellsVector;