projects
/
folly.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
908783c
)
folly/test/ThreadLocalBenchmark.cpp: avoid shadowing warning
author
Jim Meyering
<meyering@fb.com>
Thu, 3 Nov 2016 02:02:00 +0000
(19:02 -0700)
committer
Facebook Github Bot
<facebook-github-bot-bot@fb.com>
Thu, 3 Nov 2016 02:08:37 +0000
(19:08 -0700)
Summary:
There was a doubly-nested loop, both with index "i".
Change the inner for-loop index from i to j.
Reviewed By: yfeldblum
Differential Revision:
D4120589
fbshipit-source-id:
c786d8f7bb1ee05fc990db898b15836032e93940
folly/test/ThreadLocalBenchmark.cpp
patch
|
blob
|
history
diff --git
a/folly/test/ThreadLocalBenchmark.cpp
b/folly/test/ThreadLocalBenchmark.cpp
index 88691e13eb6fc739dedcc1ba7486df5adaba636c..824b73ea108c39144a79f8e4dbcfe132c7cd806b 100644
(file)
--- a/
folly/test/ThreadLocalBenchmark.cpp
+++ b/
folly/test/ThreadLocalBenchmark.cpp
@@
-66,7
+66,7
@@
DEFINE_int32(numThreads, 8, "Number simultaneous threads for benchmarks.");
for (int i = 0; i < FLAGS_numThreads; ++i) { \
threads.push_back(std::thread([&]() { \
var.reset(new int(0)); \
- for (int
i = 0; i < itersPerThread; ++i
) { \
+ for (int
j = 0; j < itersPerThread; ++j
) { \
++(*var.get()); \
} \
})); \