From c10098f28be209e90277925e3f983b7e62d1d037 Mon Sep 17 00:00:00 2001 From: Andreas Hansson Date: Tue, 19 Feb 2013 05:56:06 -0500 Subject: scons: Fix up numerous warnings about name shadowing This patch address the most important name shadowing warnings (as produced when using gcc/clang with -Wshadow). There are many locations where constructor parameters and function parameters shadow local variables, but these are left unchanged. --- src/base/statistics.hh | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'src/base/statistics.hh') diff --git a/src/base/statistics.hh b/src/base/statistics.hh index 723c8bd9c..c46eedfde 100644 --- a/src/base/statistics.hh +++ b/src/base/statistics.hh @@ -1416,9 +1416,8 @@ class DistStor data.underflow = underflow; data.overflow = overflow; - size_type buckets = params->buckets; - data.cvec.resize(buckets); - for (off_type i = 0; i < buckets; ++i) + data.cvec.resize(params->buckets); + for (off_type i = 0; i < params->buckets; ++i) data.cvec[i] = cvec[i]; data.sum = sum; @@ -2372,13 +2371,13 @@ class SumNode : public Node size_type size = lvec.size(); assert(size > 0); - Result vresult = 0.0; + Result result = 0.0; Op op; for (off_type i = 0; i < size; ++i) - vresult = op(vresult, lvec[i]); + result = op(result, lvec[i]); - return vresult; + return result; } size_type size() const { return 1; } -- cgit v1.2.3