projects
/
folly.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c8fcbc6
)
folly/test/RangeFindBenchmark.cpp: avoid shadowing warning: rename inner "n": s/...
author
Jim Meyering
<meyering@fb.com>
Thu, 3 Nov 2016 02:02:20 +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)
Reviewed By: yfeldblum
Differential Revision:
D4120553
fbshipit-source-id:
87c202232bcfabeff7eb62a8133b9b5577b09cbc
folly/test/RangeFindBenchmark.cpp
patch
|
blob
|
history
diff --git
a/folly/test/RangeFindBenchmark.cpp
b/folly/test/RangeFindBenchmark.cpp
index a6423c97f25c68daed0ec6301a76e9e4f8949cf2..ba332e61f8b37ed519875b693c90e012280d18f5 100644
(file)
--- a/
folly/test/RangeFindBenchmark.cpp
+++ b/
folly/test/RangeFindBenchmark.cpp
@@
-139,13
+139,13
@@
template <class Func>
void countHits(Func func, size_t n) {
StringPiece needles = "\r\n\1";
FOR_EACH_RANGE (i, 0, n) {
- size_t p,
n
= 0;
+ size_t p,
c
= 0;
for (StringPiece left = file;
(p = func(left, needles)) != StringPiece::npos;
left.advance(p + 1)) {
- ++
n
;
+ ++
c
;
}
- doNotOptimizeAway(
n
);
+ doNotOptimizeAway(
c
);
}
}