From bebb71a3dfadb2b94ba46c0c66f0d40d6ef75e43 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 12 Dec 2016 20:26:59 +0300 Subject: Add noexcept in some files. --- src/events/actionevent.h | 2 +- src/events/event.h | 2 +- src/events/inputguievent.h | 2 +- src/events/keyevent.h | 6 +++--- src/events/mouseevent.h | 10 +++++----- 5 files changed, 11 insertions(+), 11 deletions(-) (limited to 'src/events') diff --git a/src/events/actionevent.h b/src/events/actionevent.h index 3639e6294..1bf202595 100644 --- a/src/events/actionevent.h +++ b/src/events/actionevent.h @@ -123,7 +123,7 @@ class ActionEvent final : public Event * * @return The identifier of the event. */ - const std::string &getId() const A_WARN_UNUSED + const std::string &getId() const noexcept2 A_WARN_UNUSED { return mId; } protected: diff --git a/src/events/event.h b/src/events/event.h index 5bf7846ae..c0bf4fb46 100644 --- a/src/events/event.h +++ b/src/events/event.h @@ -101,7 +101,7 @@ class Event notfinal * * @return The source widget of the event. */ - Widget* getSource() const A_WARN_UNUSED + Widget* getSource() const noexcept2 A_WARN_UNUSED { return mSource; } protected: diff --git a/src/events/inputguievent.h b/src/events/inputguievent.h index ea5b735b1..8d6e7d7ea 100644 --- a/src/events/inputguievent.h +++ b/src/events/inputguievent.h @@ -106,7 +106,7 @@ class InputGuiEvent: public Event * false otherwise. * @see consume */ - bool isConsumed() const A_WARN_UNUSED + bool isConsumed() const noexcept2 A_WARN_UNUSED { return mIsConsumed; } protected: diff --git a/src/events/keyevent.h b/src/events/keyevent.h index 54ad54759..abde6b8ab 100644 --- a/src/events/keyevent.h +++ b/src/events/keyevent.h @@ -116,7 +116,7 @@ class KeyEvent: public InputGuiEvent * * @return The type of the event. */ - KeyEventTypeT getType() const A_WARN_UNUSED + KeyEventTypeT getType() const noexcept2 A_WARN_UNUSED { return mType; } /** @@ -124,10 +124,10 @@ class KeyEvent: public InputGuiEvent * * @return The key of the event. */ - const Key &getKey() const A_WARN_UNUSED + const Key &getKey() const noexcept2 A_WARN_UNUSED { return mKey; } - InputActionT getActionId() const A_WARN_UNUSED + InputActionT getActionId() const noexcept2 A_WARN_UNUSED { return mActionId; } #ifdef USE_SDL2 diff --git a/src/events/mouseevent.h b/src/events/mouseevent.h index c2f1d93cd..36370c631 100644 --- a/src/events/mouseevent.h +++ b/src/events/mouseevent.h @@ -111,7 +111,7 @@ class MouseEvent: public InputGuiEvent * * @return The button of the mouse event. */ - MouseButtonT getButton() const A_WARN_UNUSED + MouseButtonT getButton() const noexcept2 A_WARN_UNUSED { return mButton; } /** @@ -122,7 +122,7 @@ class MouseEvent: public InputGuiEvent * @return The x coordinate of the mouse event. * @see Widget::addMouseListener, Widget::removeMouseListener */ - int getX() const A_WARN_UNUSED + int getX() const noexcept2 A_WARN_UNUSED { return mX; } /** @@ -133,7 +133,7 @@ class MouseEvent: public InputGuiEvent * @return The y coordinate of the mouse event. * @see Widget::addMouseListener, Widget::removeMouseListener */ - int getY() const A_WARN_UNUSED + int getY() const noexcept2 A_WARN_UNUSED { return mY; } /** @@ -142,7 +142,7 @@ class MouseEvent: public InputGuiEvent * * @return The number of clicks generated with the same button. */ - int getClickCount() const A_WARN_UNUSED + int getClickCount() const noexcept2 A_WARN_UNUSED { return mClickCount; } /** @@ -150,7 +150,7 @@ class MouseEvent: public InputGuiEvent * * @return The type of the event. */ - MouseEventTypeT getType() const A_WARN_UNUSED + MouseEventTypeT getType() const noexcept2 A_WARN_UNUSED { return mType; } void setX(int n) -- cgit v1.2.3-70-g09d2