Fix TRY_STATUS_PROMISE usage with Result.
This commit is contained in:
parent
1f9c6c7352
commit
c5cee50877
@ -36,13 +36,13 @@
|
|||||||
} \
|
} \
|
||||||
}
|
}
|
||||||
|
|
||||||
#define TRY_STATUS_PROMISE(promise_name, status) \
|
#define TRY_STATUS_PROMISE(promise_name, status) \
|
||||||
{ \
|
{ \
|
||||||
auto try_status = (status); \
|
auto try_status = (status); \
|
||||||
if (try_status.is_error()) { \
|
if (try_status.is_error()) { \
|
||||||
promise_name.set_error(std::move(try_status)); \
|
promise_name.set_error(try_status.move_as_error()); \
|
||||||
return; \
|
return; \
|
||||||
} \
|
} \
|
||||||
}
|
}
|
||||||
|
|
||||||
#define TRY_STATUS_PROMISE_PREFIX(promise_name, status, prefix) \
|
#define TRY_STATUS_PROMISE_PREFIX(promise_name, status, prefix) \
|
||||||
|
Loading…
Reference in New Issue
Block a user