From ed3410d7eb61593a2235ddba97ce257c85e405a6 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 31 Aug 2012 23:42:43 +0300 Subject: Add const to more classes. --- src/keyboardconfig.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/keyboardconfig.h') 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 */ -- cgit v1.2.3-60-g2f50