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/joystick.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/joystick.h') diff --git a/src/joystick.h b/src/joystick.h index 6c8513c50..e97a900a8 100644 --- a/src/joystick.h +++ b/src/joystick.h @@ -78,9 +78,9 @@ class Joystick bool isEnabled() const { return mEnabled; } - void setNumber(int n); + void setNumber(const int n); - static void setEnabled(bool enabled) + static void setEnabled(const bool enabled) { mEnabled = enabled; } static void getNames(std::vector &names); @@ -97,7 +97,7 @@ class Joystick bool isCalibrating() const { return mCalibrating; } - bool buttonPressed(unsigned char no) const; + bool buttonPressed(const unsigned char no) const; bool isUp() const { return mEnabled && (mDirection & UP); } @@ -114,24 +114,24 @@ class Joystick int getNumber() const { return mNumber; } - void setUseInactive(bool b) + void setUseInactive(const bool b) { mUseInactive = b; } void update(); KeysVector *getActionVector(const SDL_Event &event); - KeysVector *getActionVectorByKey(int i); + KeysVector *getActionVectorByKey(const int i); int getButtonFromEvent(const SDL_Event &event) const; - bool isActionActive(int index) const; + bool isActionActive(const int index) const; bool validate() const; - void handleRepeat(int time); + void handleRepeat(const int time); - void resetRepeat(int key); + void resetRepeat(const int key); protected: unsigned char mDirection; -- cgit v1.2.3-60-g2f50