Skip to content

Commit 6153642

Browse files
generatedunixname2413856222380011meta-codesync[bot]
authored andcommitted
fbcode/folly/test
Reviewed By: ak7 Differential Revision: D92824349 fbshipit-source-id: d72e40f1ad42082d71754c7bb91c037535666109
1 parent 62db095 commit 6153642

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

folly/test/FBStringBenchmark.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,17 +51,17 @@ template <class String>
5151
void randomString(String* toFill, size_t size = 1000) {
5252
assert(toFill);
5353
toFill->resize(size);
54-
FOR_EACH (i, *toFill) {
55-
*i = random('a', 'z');
54+
for (auto& c : *toFill) {
55+
c = random('a', 'z');
5656
}
5757
}
5858

5959
template <class String>
6060
void randomBinaryString(String* toFill, size_t size = 1000) {
6161
assert(toFill);
6262
toFill->resize(size);
63-
FOR_EACH (i, *toFill) {
64-
*i = random('0', '1');
63+
for (auto& c : *toFill) {
64+
c = random('0', '1');
6565
}
6666
}
6767

0 commit comments

Comments
 (0)