From ebf930ca4820e44b33b5772260e78c6baab17604 Mon Sep 17 00:00:00 2001 From: Yang Chi Date: Wed, 30 Mar 2016 15:46:17 -0700 Subject: [PATCH] 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 --- folly/io/async/HHWheelTimer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/folly/io/async/HHWheelTimer.cpp b/folly/io/async/HHWheelTimer.cpp index f4110b02..f6c1ce8a 100644 --- a/folly/io/async/HHWheelTimer.cpp +++ b/folly/io/async/HHWheelTimer.cpp @@ -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(maxBuckets); size_t countBuckets = 0; for (auto& tick : buckets_) { -- 2.34.1