diff options
Diffstat (limited to 'src/client/inputhandler.h')
-rw-r--r-- | src/client/inputhandler.h | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/client/inputhandler.h b/src/client/inputhandler.h index 822e27863..bc8251887 100644 --- a/src/client/inputhandler.h +++ b/src/client/inputhandler.h @@ -180,8 +180,9 @@ private: class InputHandler { public: - InputHandler() {} - virtual ~InputHandler() {} + InputHandler() = default; + + virtual ~InputHandler() = default; virtual bool isKeyDown(const KeyPress &keyCode) = 0; virtual bool wasKeyDown(const KeyPress &keyCode) = 0; @@ -243,9 +244,10 @@ public: return RenderingEngine::get_raw_device() ->getCursorControl() ->getPosition(); - } else { - return m_mousepos; } + + return m_mousepos; + } virtual void setMousePos(s32 x, s32 y) { @@ -287,7 +289,8 @@ private: class RandomInputHandler : public InputHandler { public: - RandomInputHandler() {} + RandomInputHandler() = default; + virtual bool isKeyDown(const KeyPress &keyCode) { return keydown[keyCode]; } virtual bool wasKeyDown(const KeyPress &keyCode) { return false; } virtual v2s32 getMousePos() { return mousepos; } |