Skip to content

Commit

Permalink
checkother.cpp: fixed performance-unnecessary-copy-initialization c…
Browse files Browse the repository at this point in the history
…lang-tidy warning
  • Loading branch information
firewave committed Mar 3, 2024
1 parent 4557e02 commit 11485cc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/checkother.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1653,7 +1653,7 @@ void CheckOther::constVariableError(const Variable *var, const Function *functio
}

const std::string vartype(var->isArgument() ? "Parameter" : "Variable");
const std::string varname(var->name());
const std::string& varname(var->name());
const std::string ptrRefArray = var->isArray() ? "const array" : (var->isPointer() ? "pointer to const" : "reference to const");

ErrorPath errorPath;
Expand Down

0 comments on commit 11485cc

Please sign in to comment.