perf: avoid copies in range-based for loops

- take loop variables by const reference where the body does not modify
  them
- clang-tidy performance-for-range-copy
  https://clang.llvm.org/extra/clang-tidy/checks/performance/for-range-copy.html
This commit is contained in:
Dennis Klein
2026-06-09 19:59:32 +02:00
committed by Dennis Klein
parent 7a44c5e19e
commit 0feda158b4
3 changed files with 4 additions and 4 deletions

View File

@@ -79,7 +79,7 @@ Properties SuboptParser(const vector<string>& channelConfig, const string& devic
ptree channelsArray;
for (auto token : channelConfig) {
for (const auto& token : channelConfig) {
string channelName;
ptree channelProperties;