Reset optional after moving its value out in Future::Wait
This commit is contained in:
parent
0ef1f7eb5d
commit
cb70431301
@ -80,7 +80,8 @@ class Shared {
|
||||
MG_ASSERT(!consumed_, "MgFuture consumed twice!");
|
||||
}
|
||||
|
||||
T ret = *std::move(item_);
|
||||
T ret = std::move(item_).value();
|
||||
item_.reset();
|
||||
|
||||
consumed_ = true;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user