[*] Amend functional promise: fixed OnSuccess cast and added default template type
This commit is contained in:
parent
7df6614839
commit
60574f5236
@ -68,14 +68,14 @@ namespace Aurora::Async
|
||||
|
||||
inline virtual void OnSuccess(void *in) override
|
||||
{
|
||||
this->OnSuccess(AuReinterpretCast<ErrorValue_t *>(in));
|
||||
this->OnSuccess(AuReinterpretCast<SuccessValue_t *>(in));
|
||||
}
|
||||
|
||||
virtual void OnFailure(ErrorValue_t *in) = 0;
|
||||
virtual void OnSuccess(SuccessValue_t *in) = 0;
|
||||
};
|
||||
|
||||
template <class SuccessValue_t, class ErrorValue_t>
|
||||
template <class SuccessValue_t, class ErrorValue_t = AuNullS>
|
||||
struct PromiseCallbackFunctional : PromiseCallback<SuccessValue_t, ErrorValue_t>, AuEnableSharedFromThis<PromiseCallbackFunctional<SuccessValue_t, ErrorValue_t>>
|
||||
{
|
||||
using OnSuccess_f = AuFunction<void(const AuSPtr<SuccessValue_t> &)>;
|
||||
|
Loading…
Reference in New Issue
Block a user