projects
/
folly.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
abf6623
)
use unit64_t for numElements in HHWheelTimer
author
Yang Chi
<yangchi@fb.com>
Wed, 30 Mar 2016 22:46:17 +0000
(15:46 -0700)
committer
Facebook Github Bot 9
<facebook-github-bot-9-bot@fb.com>
Wed, 30 Mar 2016 22:50:22 +0000
(15:50 -0700)
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
patch
|
blob
|
history
diff --git
a/folly/io/async/HHWheelTimer.cpp
b/folly/io/async/HHWheelTimer.cpp
index f4110b02c69fb879bdeea51e7decc91394b2b37a..f6c1ce8a0b25767323a16ae5c6c4268a1912ffc9 100644
(file)
--- 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<CallbackList[]>(maxBuckets);
size_t countBuckets = 0;
for (auto& tick : buckets_) {