From dc6222611ad14a33f642396558ba84ecba9d6605 Mon Sep 17 00:00:00 2001 From: HampusM Date: Mon, 14 Mar 2022 18:02:18 +0100 Subject: perf: add noexcept almost everywhere --- src/engine/user/input.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/engine/user/input.cpp') diff --git a/src/engine/user/input.cpp b/src/engine/user/input.cpp index 1dc7f63..62aef67 100644 --- a/src/engine/user/input.cpp +++ b/src/engine/user/input.cpp @@ -2,7 +2,7 @@ #include -void InputHandler::listen() const +void InputHandler::listen() const noexcept { char character = 0; @@ -12,7 +12,7 @@ void InputHandler::listen() const } } -void InputHandler::attach(const char &event, Callback callback) +void InputHandler::attach(const char &event, Callback callback) noexcept { if (_key_observers.count(event) == 0) { @@ -22,7 +22,7 @@ void InputHandler::attach(const char &event, Callback callback) _key_observers[event].push_back(callback); } -void InputHandler::notify(const char &event) const +void InputHandler::notify(const char &event) const noexcept { if (_key_observers.count(event) == 0) { @@ -35,7 +35,7 @@ void InputHandler::notify(const char &event) const } } -void InputHandler::enter_raw_mode() +void InputHandler::enter_raw_mode() noexcept { if (_original_termios == nullptr) { @@ -51,7 +51,7 @@ void InputHandler::enter_raw_mode() tcsetattr(STDIN_FILENO, TCSAFLUSH, &raw_termios); } -void InputHandler::leave_raw_mode() +void InputHandler::leave_raw_mode() noexcept { if (_original_termios == nullptr) { -- cgit v1.2.3-18-g5258