diff mbox series

[2/2] bindings: cxx: use () instead of (void) in line_settings::reset()

Message ID 20230626105144.242168-2-brgl@bgdev.pl
State New
Headers show
Series [1/2] bindings: cxx: examples: consistently use () for functions taking no args | expand

Commit Message

Bartosz Golaszewski June 26, 2023, 10:51 a.m. UTC
From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>

While () and (void) are synonymous in C++, we use () everywhere else so
fix the only exception. This DOES NOT change the ABI as the generated
symbol is the same (at least as verified on gcc and clang).

Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
---
 bindings/cxx/gpiodcxx/line-settings.hpp | 2 +-
 bindings/cxx/line-settings.cpp          | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/bindings/cxx/gpiodcxx/line-settings.hpp b/bindings/cxx/gpiodcxx/line-settings.hpp
index b043167..bacf359 100644
--- a/bindings/cxx/gpiodcxx/line-settings.hpp
+++ b/bindings/cxx/gpiodcxx/line-settings.hpp
@@ -70,7 +70,7 @@  public:
 	 * @brief Reset the line settings to default values.
 	 * @return Reference to self.
 	 */
-	line_settings& reset(void) noexcept;
+	line_settings& reset() noexcept;
 
 	/**
 	 * @brief Set direction.
diff --git a/bindings/cxx/line-settings.cpp b/bindings/cxx/line-settings.cpp
index 272a848..30d7899 100644
--- a/bindings/cxx/line-settings.cpp
+++ b/bindings/cxx/line-settings.cpp
@@ -179,7 +179,7 @@  GPIOD_CXX_API line_settings& line_settings::operator=(line_settings&& other)
 	return *this;
 }
 
-GPIOD_CXX_API line_settings& line_settings::reset(void) noexcept
+GPIOD_CXX_API line_settings& line_settings::reset() noexcept
 {
 	::gpiod_line_settings_reset(this->_m_priv->settings.get());