From 5def18b0d95925ac2224062dda4df1b296b94e2e Mon Sep 17 00:00:00 2001 From: Bartosz Golaszewski Date: Mon, 19 Feb 2018 10:40:35 +0100 Subject: [PATCH] bindings: cxx: constify default_vals in line_bulk::request() The default values should be passed by const reference similarly to how it's done in line_bulk::set_values(). Signed-off-by: Bartosz Golaszewski --- bindings/cxx/gpiod.hpp | 2 +- bindings/cxx/line_bulk.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bindings/cxx/gpiod.hpp b/bindings/cxx/gpiod.hpp index da3747a..5710d36 100644 --- a/bindings/cxx/gpiod.hpp +++ b/bindings/cxx/gpiod.hpp @@ -590,7 +590,7 @@ public: * output direction requests. */ GPIOD_API void request(const line_request& config, - std::vector default_vals = std::vector()) const; + const std::vector default_vals = std::vector()) const; /** * @brief Read values from all lines held by this object. diff --git a/bindings/cxx/line_bulk.cpp b/bindings/cxx/line_bulk.cpp index 72dd7d4..ec0d724 100644 --- a/bindings/cxx/line_bulk.cpp +++ b/bindings/cxx/line_bulk.cpp @@ -97,7 +97,7 @@ void line_bulk::clear(void) this->_m_bulk.clear(); } -void line_bulk::request(const line_request& config, std::vector default_vals) const +void line_bulk::request(const line_request& config, const std::vector default_vals) const { this->throw_if_empty(); -- 2.30.2