Commit 0ca41077 authored by Jim Meyering's avatar Jim Meyering Committed by Facebook Github Bot

folly/test/RangeFindBenchmark.cpp: avoid shadowing warning: rename inner "n": s/\<n\>/c/

Reviewed By: yfeldblum

Differential Revision: D4120553

fbshipit-source-id: 87c202232bcfabeff7eb62a8133b9b5577b09cbc
parent c8fcbc6b
...@@ -139,13 +139,13 @@ template <class Func> ...@@ -139,13 +139,13 @@ template <class Func>
void countHits(Func func, size_t n) { void countHits(Func func, size_t n) {
StringPiece needles = "\r\n\1"; StringPiece needles = "\r\n\1";
FOR_EACH_RANGE (i, 0, n) { FOR_EACH_RANGE (i, 0, n) {
size_t p, n = 0; size_t p, c = 0;
for (StringPiece left = file; for (StringPiece left = file;
(p = func(left, needles)) != StringPiece::npos; (p = func(left, needles)) != StringPiece::npos;
left.advance(p + 1)) { left.advance(p + 1)) {
++n; ++c;
} }
doNotOptimizeAway(n); doNotOptimizeAway(c);
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment