[libgpiod] [PATCH 05/19] bindings: cxx: drop noexcept from direction and active_state

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Both direction and active_state methods can throw and so should not be
declared as noexcept.

Signed-off-by: Kent Gibson <warthog618@xxxxxxxxx>
---
 bindings/cxx/gpiod.hpp | 4 ++--
 bindings/cxx/line.cpp  | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

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();
 
-- 
2.24.0




[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux