Skip to content

Commit 38471ba

Browse files
committed
Reduce variable scope.
1 parent fb04c8f commit 38471ba

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

gui/test/data/benchmark/simple.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1356,7 +1356,6 @@ static int doAssignment(Variables &variables, const Token *tok, bool dereference
13561356
Variables::VariableUsage *var1 = variables.find(varid1);
13571357

13581358
if (var1) {
1359-
Variables::VariableUsage *var2 = 0;
13601359
int start = 1;
13611360

13621361
// search for '='
@@ -1437,7 +1436,7 @@ static int doAssignment(Variables &variables, const Token *tok, bool dereference
14371436

14381437
// check if variable is local
14391438
varid2 = tok->tokAt(next)->varId();
1440-
var2 = variables.find(varid2);
1439+
Variables::VariableUsage *var2 = variables.find(varid2);
14411440

14421441
if (var2) { // local variable (alias or read it)
14431442
if (var1->_type == Variables::pointer) {

0 commit comments

Comments
 (0)