Commit bad11d29 authored by Yang Chi's avatar Yang Chi Committed by Facebook Github Bot 2

No need to go through the list when you just want the size

Summary: cb is an unused variable, and i got error in android. It seems like we don't need to go through the list to increase count.

Differential Revision: D3622772

fbshipit-source-id: fe1f81a1fcad5bacad052e14b7b0b370beb3f3e5
parent 66950202
......@@ -237,9 +237,7 @@ size_t HHWheelTimer::cancelAll() {
if (bucket.empty()) {
continue;
}
for (auto& cb : bucket) {
count++;
}
count += bucket.size();
std::swap(bucket, buckets[countBuckets++]);
if (count >= count_) {
break;
......
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