Skip to content

Commit

Permalink
fix variable shadowing
Browse files Browse the repository at this point in the history
  • Loading branch information
Anton Myagkov authored and jszuppe committed Dec 27, 2018
1 parent be85263 commit 217f77a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions example/simple_moving_average.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ bool check_results(const std::vector<float>& values, const std::vector<float>& s

int semiWidth = wSize/2;

bool res = true;
bool ret = true;
for(int idx = 0 ; idx < size ; ++idx)
{
int start = (std::max)(idx - semiWidth,0);
Expand All @@ -76,11 +76,11 @@ bool check_results(const std::vector<float>& values, const std::vector<float>& s
if(std::abs(res-smoothValues[idx]) > 1e-3)
{
std::cout << "idx = " << idx << " -- expected = " << res << " -- result = " << smoothValues[idx] << std::endl;
res = false;
ret = false;
}
}

return res;
return ret;
}

// generate a uniform law over [0,10]
Expand Down

0 comments on commit 217f77a

Please sign in to comment.