Fabric: Explicit clearing std::vector after moving from it

Summary: Apparently, the standard does not guarantee that the vector is empty after moving from it. So, let's clear it explicitly instead of asserting the emptiness.

Reviewed By: sahrens

Differential Revision: D12837227

fbshipit-source-id: 85dff6848707f4204f4c79be173064547e83c63e
This commit is contained in:
Valentin Shergin 2018-11-06 10:58:49 -08:00 committed by Facebook Github Bot
parent 98685e8960
commit 3110a67047
2 changed files with 2 additions and 2 deletions

View File

@ -62,7 +62,7 @@ void EventBeatBasedExecutor::onBeat(bool success) const {
}
tasks = std::move(tasks_);
assert(tasks_.size() == 0);
tasks_.clear();
}
for (const auto task : tasks) {

View File

@ -35,7 +35,7 @@ void EventQueue::onBeat() const {
}
queue = std::move(queue_);
assert(queue_.size() == 0);
queue_.clear();
}
{