summaryrefslogtreecommitdiff
path: root/src/input
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-12-12 20:26:59 +0300
committerAndrei Karas <akaras@inbox.ru>2016-12-12 20:26:59 +0300
commitbebb71a3dfadb2b94ba46c0c66f0d40d6ef75e43 (patch)
tree4d631106f76ba8a052dc2ef8b23b8a968040db82 /src/input
parent67638eeec5267977940dce29c5a94ce4d093ed69 (diff)
downloadplus-bebb71a3dfadb2b94ba46c0c66f0d40d6ef75e43.tar.gz
plus-bebb71a3dfadb2b94ba46c0c66f0d40d6ef75e43.tar.bz2
plus-bebb71a3dfadb2b94ba46c0c66f0d40d6ef75e43.tar.xz
plus-bebb71a3dfadb2b94ba46c0c66f0d40d6ef75e43.zip
Add noexcept in some files.
Diffstat (limited to 'src/input')
-rw-r--r--src/input/joystick.h12
-rw-r--r--src/input/keyboardconfig.h2
-rw-r--r--src/input/keyinput.h18
-rw-r--r--src/input/mouseinput.h34
4 files changed, 33 insertions, 33 deletions
diff --git a/src/input/joystick.h b/src/input/joystick.h
index e302de53e..5942dbbdc 100644
--- a/src/input/joystick.h
+++ b/src/input/joystick.h
@@ -93,24 +93,24 @@ class Joystick final
void finishCalibration();
- bool isCalibrating() const A_WARN_UNUSED
+ bool isCalibrating() const noexcept2 A_WARN_UNUSED
{ return mCalibrating; }
bool buttonPressed(const unsigned char no) const A_WARN_UNUSED;
- bool isUp() const A_WARN_UNUSED
+ bool isUp() const noexcept2 A_WARN_UNUSED
{ return mEnabled && (mDirection & UP); }
- bool isDown() const A_WARN_UNUSED
+ bool isDown() const noexcept2 A_WARN_UNUSED
{ return mEnabled && (mDirection & DOWN); }
- bool isLeft() const A_WARN_UNUSED
+ bool isLeft() const noexcept2 A_WARN_UNUSED
{ return mEnabled && (mDirection & LEFT); }
- bool isRight() const A_WARN_UNUSED
+ bool isRight() const noexcept2 A_WARN_UNUSED
{ return mEnabled && (mDirection & RIGHT); }
- int getNumber() const A_WARN_UNUSED
+ int getNumber() const noexcept2 A_WARN_UNUSED
{ return mNumber; }
void setUseInactive(const bool b)
diff --git a/src/input/keyboardconfig.h b/src/input/keyboardconfig.h
index 3b9610141..ad5e89ad8 100644
--- a/src/input/keyboardconfig.h
+++ b/src/input/keyboardconfig.h
@@ -57,7 +57,7 @@ class KeyboardConfig final
/**
* Get the enable flag, which will stop the user from doing actions.
*/
- bool isEnabled() const A_WARN_UNUSED
+ bool isEnabled() const noexcept2 A_WARN_UNUSED
{ return mEnabled; }
/**
diff --git a/src/input/keyinput.h b/src/input/keyinput.h
index cd5235575..3affc6312 100644
--- a/src/input/keyinput.h
+++ b/src/input/keyinput.h
@@ -98,7 +98,7 @@ class KeyInput final
{
}
- KeyInput &operator=(const KeyInput &k)
+ KeyInput &operator=(const KeyInput &k) noexcept2
{
mKey = k.mKey;
mType = k.mType;
@@ -112,43 +112,43 @@ class KeyInput final
~KeyInput()
{ }
- void setType(KeyEventTypeT type)
+ void setType(KeyEventTypeT type) noexcept2
{
mType = type;
}
- KeyEventTypeT getType() const
+ KeyEventTypeT getType() const noexcept2 A_WARN_UNUSED
{
return mType;
}
- void setKey(const Key& key)
+ void setKey(const Key& key) noexcept2
{
mKey = key;
}
- const Key& getKey() const
+ const Key& getKey() const noexcept2
{
return mKey;
}
- void setActionId(const InputActionT n)
+ void setActionId(const InputActionT n) noexcept2
{
mActionId = n;
}
- InputActionT getActionId() const A_WARN_UNUSED
+ InputActionT getActionId() const noexcept2 A_WARN_UNUSED
{
return mActionId;
}
#ifdef USE_SDL2
- void setText(const std::string &text)
+ void setText(const std::string &text) noexcept2
{
mText = text;
}
- std::string getText() const
+ std::string getText() const noexcept2
{
return mText;
}
diff --git a/src/input/mouseinput.h b/src/input/mouseinput.h
index a8a948cf3..e5121d93c 100644
--- a/src/input/mouseinput.h
+++ b/src/input/mouseinput.h
@@ -108,77 +108,77 @@ class MouseInput final
~MouseInput()
{ }
- void setType(MouseEventTypeT type)
+ void setType(MouseEventTypeT type) noexcept2
{
mType = type;
}
- MouseEventTypeT getType() const
+ MouseEventTypeT getType() const noexcept2
{
return mType;
}
- void setButton(MouseButtonT button)
+ void setButton(MouseButtonT button) noexcept2
{
mButton = button;
}
- MouseButtonT getButton() const
+ MouseButtonT getButton() const noexcept2
{
return mButton;
}
- int getTimeStamp() const
+ int getTimeStamp() const noexcept2
{
return mTimeStamp;
}
- void setTimeStamp(int timeStamp)
+ void setTimeStamp(int timeStamp) noexcept2
{
mTimeStamp = timeStamp;
}
- void setX(int x)
+ void setX(int x) noexcept2
{
mX = x;
}
- int getX() const
+ int getX() const noexcept2
{
return mX;
}
- void setY(int y)
+ void setY(int y) noexcept2
{
mY = y;
}
- int getY() const
+ int getY() const noexcept2
{
return mY;
}
- void setReal(const int x, const int y)
+ void setReal(const int x, const int y) noexcept2
{ mRealX = x; mRealY = y; }
- int getRealX() const A_WARN_UNUSED
+ int getRealX() const noexcept2 A_WARN_UNUSED
{ return mRealX; }
- int getRealY() const A_WARN_UNUSED
+ int getRealY() const noexcept2 A_WARN_UNUSED
{ return mRealY; }
#ifdef ANDROID
- int getTouchX() const A_WARN_UNUSED
+ int getTouchX() const noexcept2 A_WARN_UNUSED
{ return mRealX; }
- int getTouchY() const A_WARN_UNUSED
+ int getTouchY() const noexcept2 A_WARN_UNUSED
{ return mRealY; }
#else // ANDROID
- int getTouchX() const A_WARN_UNUSED
+ int getTouchX() const noexcept2 A_WARN_UNUSED
{ return mX; }
- int getTouchY() const A_WARN_UNUSED
+ int getTouchY() const noexcept2 A_WARN_UNUSED
{ return mY; }
#endif // ANDROID