aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/cpp/qps/stats.h
diff options
context:
space:
mode:
authorGravatar Vijay Pai <vpai@google.com>2015-03-24 10:36:08 -0700
committerGravatar Vijay Pai <vpai@google.com>2015-03-24 10:36:08 -0700
commit82dd80abc6fffab0f0bcff406dbd0750a6a45b37 (patch)
tree2015139aa7e4951be748b52d81ffacb7b36a04e5 /test/cpp/qps/stats.h
parent8ba8cfe143d47c8c9b14cd0cb0fbf968112cfc9c (diff)
Elminate range-based fors and work around some other limitations in older compilers
Diffstat (limited to 'test/cpp/qps/stats.h')
-rw-r--r--test/cpp/qps/stats.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/cpp/qps/stats.h b/test/cpp/qps/stats.h
index ca59390ad7..82dc03e3da 100644
--- a/test/cpp/qps/stats.h
+++ b/test/cpp/qps/stats.h
@@ -43,8 +43,8 @@ namespace testing {
template <class T, class F>
double sum(const T& container, F functor) {
double r = 0;
- for (auto v : container) {
- r += functor(v);
+ for (auto v = container.begin(); v != container.end(); v++) {
+ r += functor(*v);
}
return r;
}