diff --git a/src/improv.cpp b/src/improv.cpp index 63ebc9d..bce9747 100644 --- a/src/improv.cpp +++ b/src/improv.cpp @@ -98,7 +98,7 @@ std::vector build_rpc_response(Command command, const std::vector out; uint32_t length = 0; out.push_back(command); - for (auto str : datum) { + for (const auto &str : datum) { uint8_t len = str.length(); length += len + 1; out.push_back(len); @@ -122,7 +122,7 @@ std::vector build_rpc_response(Command command, const std::vector out; uint32_t length = 0; out.push_back(command); - for (auto str : datum) { + for (const auto &str : datum) { uint8_t len = str.length(); length += len; out.push_back(len);