mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-22 14:52:45 +01:00
fix clang
This commit is contained in:
parent
22b5180b82
commit
eed403ea0c
1 changed files with 5 additions and 6 deletions
|
@ -30,9 +30,8 @@ Fiber::Fiber() : impl{std::make_unique<FiberImpl>()} {
|
||||||
|
|
||||||
Fiber::Fiber(std::function<void()>&& entry_point_func) : impl{std::make_unique<FiberImpl>()} {
|
Fiber::Fiber(std::function<void()>&& entry_point_func) : impl{std::make_unique<FiberImpl>()} {
|
||||||
impl->entry_point = std::move(entry_point_func);
|
impl->entry_point = std::move(entry_point_func);
|
||||||
auto desc = mco_desc_init([] (mco_coro *coro) {
|
auto desc = mco_desc_init(
|
||||||
reinterpret_cast<Fiber*>(coro->user_data)->impl->entry_point();
|
[](mco_coro* coro) { reinterpret_cast<Fiber*>(coro->user_data)->impl->entry_point(); }, 0);
|
||||||
}, 0);
|
|
||||||
desc.user_data = this;
|
desc.user_data = this;
|
||||||
mco_result res = mco_create(&impl->context, &desc);
|
mco_result res = mco_create(&impl->context, &desc);
|
||||||
ASSERT(res == MCO_SUCCESS);
|
ASSERT(res == MCO_SUCCESS);
|
||||||
|
|
Loading…
Reference in a new issue