Skip to content

Commit 217f77a

Browse files
Anton Myagkovjszuppe
authored andcommitted
fix variable shadowing
1 parent be85263 commit 217f77a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

example/simple_moving_average.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ bool check_results(const std::vector<float>& values, const std::vector<float>& s
6060

6161
int semiWidth = wSize/2;
6262

63-
bool res = true;
63+
bool ret = true;
6464
for(int idx = 0 ; idx < size ; ++idx)
6565
{
6666
int start = (std::max)(idx - semiWidth,0);
@@ -76,11 +76,11 @@ bool check_results(const std::vector<float>& values, const std::vector<float>& s
7676
if(std::abs(res-smoothValues[idx]) > 1e-3)
7777
{
7878
std::cout << "idx = " << idx << " -- expected = " << res << " -- result = " << smoothValues[idx] << std::endl;
79-
res = false;
79+
ret = false;
8080
}
8181
}
8282

83-
return res;
83+
return ret;
8484
}
8585

8686
// generate a uniform law over [0,10]

0 commit comments

Comments
 (0)