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:
parent
98685e8960
commit
3110a67047
|
@ -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) {
|
||||
|
|
|
@ -35,7 +35,7 @@ void EventQueue::onBeat() const {
|
|||
}
|
||||
|
||||
queue = std::move(queue_);
|
||||
assert(queue_.size() == 0);
|
||||
queue_.clear();
|
||||
}
|
||||
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue