Skip to content

Commit 6e6b374

Browse files
Fix copy-paste-error (#5444)
This is a warning we found during static analyis with CodeSecure CodeSonar. It flagged a suspicious copy-paste error, where it finds code that seems to have been copied from another location, with some, but not all, variables substituted. Unclear to me if this truly is a problem, or intentional, but I wanted to provide the feedback as I am not sure how to test this. Lines 5614 to 5619 in lib/symboldatabase.cpp are a copy from 5597-5602 with vartok replaced by valuetok, except for line 5616
1 parent a1078f4 commit 6e6b374

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/symboldatabase.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5638,7 +5638,7 @@ const Function* Scope::findFunction(const Token *tok, bool requireConst) const
56385638
}
56395639
const Token* valuetok = arguments[j];
56405640
if (valuetok->str() == "::") {
5641-
const Token* rml = nextAfterAstRightmostLeaf(vartok);
5641+
const Token* rml = nextAfterAstRightmostLeaf(valuetok);
56425642
if (rml)
56435643
valuetok = rml->previous();
56445644
}

0 commit comments

Comments
 (0)