summaryrefslogtreecommitdiff
path: root/src/joystick.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/joystick.h
parent386dac2875f4a5ad4a534c403338db3b26239a68 (diff)
downloadplus-ed3410d7eb61593a2235ddba97ce257c85e405a6.tar.gz
plus-ed3410d7eb61593a2235ddba97ce257c85e405a6.tar.bz2
plus-ed3410d7eb61593a2235ddba97ce257c85e405a6.tar.xz
plus-ed3410d7eb61593a2235ddba97ce257c85e405a6.zip
Add const to more classes.
Diffstat (limited to 'src/joystick.h')
-rw-r--r--src/joystick.h16
1 files changed, 8 insertions, 8 deletions
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 <std::string> &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;