Skip to content

Commit 15c166e

Browse files
pbhandar2facebook-github-bot
authored andcommitted
Revert the C++20 changes that is breaking OSS.
Summary: Revert D71624494 Reviewed By: byahn0996 Differential Revision: D71847677 fbshipit-source-id: 837872c4e7d92721728e684db7469053f4004323
1 parent 291004d commit 15c166e

3 files changed

Lines changed: 6 additions & 6 deletions

File tree

cachelib/allocator/tests/MM2QTest.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ TEST_F(MM2QTest, SegmentStress) {
336336
return;
337337
}
338338
auto n = folly::Random::rand32() % nNodes;
339-
while (inLru.contains(n)) {
339+
while (inLru.count(n) != 0) {
340340
n = folly::Random::rand32() % nNodes;
341341
}
342342
c.add(*nodes[n]);
@@ -355,7 +355,7 @@ TEST_F(MM2QTest, SegmentStress) {
355355
n = folly::Random::rand32() % nNodes;
356356
}
357357
c.remove(*nodes[n]);
358-
assert(inLru.contains(n));
358+
assert(inLru.count(n) != 0);
359359
inLru.erase(n);
360360
};
361361

cachelib/allocator/tests/MMLruTest.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,7 @@ TEST_F(MMLruTest, InsertionPointStress) {
419419
return;
420420
}
421421
auto n = folly::Random::rand32() % nNodes;
422-
while (inLru.contains(n)) {
422+
while (inLru.count(n) != 0) {
423423
n = folly::Random::rand32() % nNodes;
424424
}
425425
c.add(*nodes[n]);
@@ -442,7 +442,7 @@ TEST_F(MMLruTest, InsertionPointStress) {
442442
n = folly::Random::rand32() % nNodes;
443443
}
444444
c.remove(*nodes[n]);
445-
assert(inLru.contains(n));
445+
assert(inLru.count(n) != 0);
446446
inLru.erase(n);
447447
#ifdef PRINT_DEBUG_STR
448448
XLOG(INFO) << "remove " << n;

cachelib/allocator/tests/MMTinyLFUTest.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ TEST_F(MMTinyLFUTest, SegmentStress) {
321321
return;
322322
}
323323
auto n = folly::Random::rand32() % nNodes;
324-
while (inLru.contains(n)) {
324+
while (inLru.count(n) != 0) {
325325
n = folly::Random::rand32() % nNodes;
326326
}
327327
c.add(*nodes[n]);
@@ -340,7 +340,7 @@ TEST_F(MMTinyLFUTest, SegmentStress) {
340340
n = folly::Random::rand32() % nNodes;
341341
}
342342
c.remove(*nodes[n]);
343-
assert(inLru.contains(n));
343+
assert(inLru.count(n) != 0);
344344
inLru.erase(n);
345345
};
346346

0 commit comments

Comments
 (0)