diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-08-26 02:48:32 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-08-26 02:48:32 +0300 |
commit | ab596ef3f4215f792feaa9ca1dfe5acb74c67328 (patch) | |
tree | ac5a4f31e2fa9c784d7de8d817654d47e21ccac2 /src/emoteshortcut.cpp | |
parent | 399f264360f6e8dfa31d0c3ff7d72aad8033888d (diff) | |
download | plus-ab596ef3f4215f792feaa9ca1dfe5acb74c67328.tar.gz plus-ab596ef3f4215f792feaa9ca1dfe5acb74c67328.tar.bz2 plus-ab596ef3f4215f792feaa9ca1dfe5acb74c67328.tar.xz plus-ab596ef3f4215f792feaa9ca1dfe5acb74c67328.zip |
Add const to some classes.
Diffstat (limited to 'src/emoteshortcut.cpp')
-rw-r--r-- | src/emoteshortcut.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/emoteshortcut.cpp b/src/emoteshortcut.cpp index 72495b361..365fd4747 100644 --- a/src/emoteshortcut.cpp +++ b/src/emoteshortcut.cpp @@ -48,7 +48,7 @@ void EmoteShortcut::load() i <= EmoteDB::getLast() && j < SHORTCUT_EMOTES; i++) { - const AnimatedSprite* sprite = EmoteDB::getAnimation(i, true); + const AnimatedSprite *const sprite = EmoteDB::getAnimation(i, true); if (sprite) { mEmotes[j] = static_cast<unsigned char>(i + 1); @@ -57,18 +57,18 @@ void EmoteShortcut::load() } } -void EmoteShortcut::save() +void EmoteShortcut::save() const { for (int i = 0; i < SHORTCUT_EMOTES; i++) { - unsigned char emoteId = mEmotes[i] ? mEmotes[i] - : static_cast<unsigned char>(0); + const unsigned char emoteId = mEmotes[i] ? mEmotes[i] + : static_cast<unsigned char>(0); serverConfig.setValue("emoteshortcut" + toString(i), - static_cast<unsigned int>(emoteId)); + static_cast<unsigned int>(emoteId)); } } -void EmoteShortcut::useEmote(int index) +void EmoteShortcut::useEmote(const int index) const { if (!player_node) return; |