From: Kent Gibson Date: Fri, 15 Nov 2019 14:43:41 +0000 (+0800) Subject: bindings: cxx: drop noexcept from direction() and active_state() X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=bf7ce9f6320c36dfd16386f9f0ffeba85fe79514;p=qemu-gpiodev%2Flibgpiod.git bindings: cxx: drop noexcept from direction() and active_state() Both line::direction() and line::active_state() methods can throw and so should not be declared as noexcept. Signed-off-by: Kent Gibson Signed-off-by: Bartosz Golaszewski --- diff --git a/bindings/cxx/gpiod.hpp b/bindings/cxx/gpiod.hpp index 13b4d5b..b5a9401 100644 --- a/bindings/cxx/gpiod.hpp +++ b/bindings/cxx/gpiod.hpp @@ -312,13 +312,13 @@ public: * @brief Get current direction of this line. * @return Current direction setting. */ - GPIOD_API int direction(void) const noexcept; + GPIOD_API int direction(void) const; /** * @brief Get current active state of this line. * @return Current active state setting. */ - GPIOD_API int active_state(void) const noexcept; + GPIOD_API int active_state(void) const; /** * @brief Check if this line is used by the kernel or other user space diff --git a/bindings/cxx/line.cpp b/bindings/cxx/line.cpp index b698960..df6eada 100644 --- a/bindings/cxx/line.cpp +++ b/bindings/cxx/line.cpp @@ -49,7 +49,7 @@ unsigned int line::offset(void) const return consumer ? ::std::string(consumer) : ::std::string(); } -int line::direction(void) const noexcept +int line::direction(void) const { this->throw_if_null(); @@ -58,7 +58,7 @@ int line::direction(void) const noexcept return dir == GPIOD_LINE_DIRECTION_INPUT ? DIRECTION_INPUT : DIRECTION_OUTPUT; } -int line::active_state(void) const noexcept +int line::active_state(void) const { this->throw_if_null();