summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ideasonboard.com>2025-09-13 18:20:35 +0300
committerTomi Valkeinen <tomi.valkeinen@ideasonboard.com>2025-12-18 12:23:57 +0200
commitbb4d48fbf9d0ad6be570d9c9b052f835f3a8b0d5 (patch)
tree7feeb721a184e7e704a7a55d3c73691297b7b7ab /utils
parentd785a753f9406bf74150e038ccf58b8b40eea932 (diff)
fix: Use const references to avoid unnecessary variable copying
This commit addresses cppcheck warnings about variables that can be declared as const references (constVariableReference). These variables were being copied unnecessarily when they could be accessed as const references, improving performance and code clarity. Fixed files: - kms++util/src/cpuframebuffer.cpp: Make plane reference const in destructor - kms++util/src/testpat.cpp: Make info and lambda parameter const references - utils/kmstest.cpp: Make loop variable const reference in output parsing
Diffstat (limited to 'utils')
-rw-r--r--utils/kmstest.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/utils/kmstest.cpp b/utils/kmstest.cpp
index 5028e7e..8340fa7 100644
--- a/utils/kmstest.cpp
+++ b/utils/kmstest.cpp
@@ -572,7 +572,7 @@ static vector<OutputInfo> setups_to_outputs(Card& card, ResourceManager& resman,
OutputInfo* current_output = 0;
PlaneInfo* current_plane = 0;
- for (auto& arg : output_args) {
+ for (const auto& arg : output_args) {
switch (arg.type) {
case ArgType::Connector: {
outputs.push_back(OutputInfo{});