Fix Cppcheck warning. Use reference to avoid redundant data-copy
This commit is contained in:
parent
d9358de8b4
commit
ffac614f7e
|
@ -3411,7 +3411,7 @@ void CheckOther::oppositeInnerCondition()
|
||||||
if (!cond1 || !cond1->isComparisonOp())
|
if (!cond1 || !cond1->isComparisonOp())
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
const std::string comp1 = cond1->str();
|
const std::string &comp1 = cond1->str();
|
||||||
|
|
||||||
if (!Token::simpleMatch(scope->classDef->linkAt(1), ") { if"))
|
if (!Token::simpleMatch(scope->classDef->linkAt(1), ") { if"))
|
||||||
continue;
|
continue;
|
||||||
|
|
Loading…
Reference in New Issue