Commit ebf930ca authored by Yang Chi's avatar Yang Chi Committed by Facebook Github Bot 9

use unit64_t for numElements in HHWheelTimer

Summary: Some compiler will complain about this when calling std::min with a size_t and a uint64_t. So use unit64_t for numElements in HHWheelTimer.

Reviewed By: mzlee

Differential Revision: D3116346

fb-gh-sync-id: 67a9eebf4f9e8fe0e732a7292af55122be04163b
fbshipit-source-id: 67a9eebf4f9e8fe0e732a7292af55122be04163b
parent abf66230
......@@ -229,8 +229,8 @@ size_t HHWheelTimer::cancelAll() {
size_t count = 0;
if (count_ != 0) {
const size_t numElements = WHEEL_BUCKETS * WHEEL_SIZE;
size_t maxBuckets = std::min(numElements, count_);
const uint64_t numElements = WHEEL_BUCKETS * WHEEL_SIZE;
auto maxBuckets = std::min(numElements, count_);
auto buckets = folly::make_unique<CallbackList[]>(maxBuckets);
size_t countBuckets = 0;
for (auto& tick : buckets_) {
......
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