From 3ddee386b26135fb8788c966fbcea544ad283591 Mon Sep 17 00:00:00 2001 From: proddy Date: Sun, 27 Mar 2022 23:16:02 +0200 Subject: [PATCH] code optimization --- src/emsdevice.cpp | 2 +- src/emsdevice.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/emsdevice.cpp b/src/emsdevice.cpp index a130bc57e..5e8c44174 100644 --- a/src/emsdevice.cpp +++ b/src/emsdevice.cpp @@ -858,7 +858,7 @@ void EMSdevice::reset_entity_masks() { } // disable/exclude/mask_out a device entity based on the id -void EMSdevice::mask_entity(std::string & entity_id) { +void EMSdevice::mask_entity(const std::string & entity_id) { // first character contains mask flags uint8_t flag = Helpers::hextoint(entity_id.substr(0, 2).c_str()); for (auto & dv : devicevalues_) { diff --git a/src/emsdevice.h b/src/emsdevice.h index 081f61bc1..9f292169a 100644 --- a/src/emsdevice.h +++ b/src/emsdevice.h @@ -183,7 +183,7 @@ class EMSdevice { char * show_telegram_handlers(char * result, const size_t len, const uint8_t handlers); void show_mqtt_handlers(uuid::console::Shell & shell) const; void list_device_entries(JsonObject & output) const; - void mask_entity(std::string & entity_id); + void mask_entity(const std::string & entity_id); void reset_entity_masks(); using process_function_p = std::function)>;