summaryrefslogtreecommitdiff
path: root/src/keyboardconfig.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-08-31 23:42:43 +0300
committerAndrei Karas <akaras@inbox.ru>2012-09-01 18:47:54 +0300
commited3410d7eb61593a2235ddba97ce257c85e405a6 (patch)
tree565c93ff291f70749cda2f59a4cc6fcd015ff203 /src/keyboardconfig.h
parent386dac2875f4a5ad4a534c403338db3b26239a68 (diff)
downloadmanaverse-ed3410d7eb61593a2235ddba97ce257c85e405a6.tar.gz
manaverse-ed3410d7eb61593a2235ddba97ce257c85e405a6.tar.bz2
manaverse-ed3410d7eb61593a2235ddba97ce257c85e405a6.tar.xz
manaverse-ed3410d7eb61593a2235ddba97ce257c85e405a6.zip
Add const to more classes.
Diffstat (limited to 'src/keyboardconfig.h')
-rw-r--r--src/keyboardconfig.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/keyboardconfig.h b/src/keyboardconfig.h
index ae9bafa2f..6f01618ec 100644
--- a/src/keyboardconfig.h
+++ b/src/keyboardconfig.h
@@ -55,12 +55,12 @@ class KeyboardConfig
/**
* Get the key function index by providing the keys value.
*/
- int getKeyIndex(const SDL_Event &event, int grp = 1) const;
+ int getKeyIndex(const SDL_Event &event, const int grp = 1) const;
/**
* Set the enable flag, which will stop the user from doing actions.
*/
- void setEnabled(bool flag)
+ void setEnabled(const bool flag)
{ mEnabled = flag; }
/**
@@ -76,11 +76,11 @@ class KeyboardConfig
KeysVector *getActionVector(const SDL_Event &event);
- KeysVector *getActionVectorByKey(int i);
+ KeysVector *getActionVectorByKey(const int i);
- std::string getKeyName(int key);
+ std::string getKeyName(const int key) const;
- bool isActionActive(int index) const;
+ bool isActionActive(const int index) const;
void update();
@@ -90,9 +90,9 @@ class KeyboardConfig
int getActionId(const SDL_Event &event);
- void handleRepeat(int time);
+ void handleRepeat(const int time);
- void resetRepeat(int key);
+ void resetRepeat(const int key);
private:
bool mEnabled; /**< Flag to respond to key input */