diff --git a/src/emsdevice.cpp b/src/emsdevice.cpp index de9a88eb7..715484bb0 100644 --- a/src/emsdevice.cpp +++ b/src/emsdevice.cpp @@ -489,7 +489,7 @@ bool EMSdevice::is_readable(const void * value_p) const { } // check if value/command is readonly -bool EMSdevice::is_readonly(const std::string cmd, const int8_t id) const { +bool EMSdevice::is_readonly(const std::string & cmd, const int8_t id) const { uint8_t tag = id > 0 ? DeviceValueTAG::TAG_HC1 + id - 1 : DeviceValueTAG::TAG_NONE; for (const auto & dv : devicevalues_) { // check command name and tag, id -1 is default hc and only checks name diff --git a/src/emsdevice.h b/src/emsdevice.h index d95f92862..a521a042c 100644 --- a/src/emsdevice.h +++ b/src/emsdevice.h @@ -243,7 +243,7 @@ class EMSdevice { void read_command(const uint16_t type_id, uint8_t offset = 0, uint8_t length = 0) const; bool is_readable(const void * value_p) const; - bool is_readonly(const std::string cmd, const int8_t id) const; + bool is_readonly(const std::string & cmd, const int8_t id) const; bool has_command(const void * value_p) const; void publish_value(void * value_p) const; void publish_all_values();