Skip to content

Commit c3de7cf

Browse files
committed
Token: avoid unnecessary update_property_info() in link()
1 parent 406da75 commit c3de7cf

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/token.h

+3
Original file line numberDiff line numberDiff line change
@@ -1096,6 +1096,9 @@ class CPPCHECKLIB Token {
10961096
* to.
10971097
*/
10981098
void link(Token *linkToToken) {
1099+
if (mLink == linkToToken)
1100+
return;
1101+
10991102
mLink = linkToToken;
11001103
if (mStr == "<" || mStr == ">")
11011104
update_property_info();

0 commit comments

Comments
 (0)