[-] Clean up ugly returns in async.hpp

This commit is contained in:
Reece Wilson 2021-10-19 05:26:15 +01:00
parent d2732b6d43
commit 0ffb19066d

View File

@ -163,17 +163,14 @@ namespace Aurora::Async
if constexpr (std::is_same_v<Functional_t, AuConsumer<const In_t &>>) if constexpr (std::is_same_v<Functional_t, AuConsumer<const In_t &>>)
{ {
func(a); func(a);
return Out_t{};
} }
else if constexpr (std::is_same_v<Functional_t, AuConsumer<const In_t *>>) else if constexpr (std::is_same_v<Functional_t, AuConsumer<const In_t *>>)
{ {
func(&a); func(&a);
return Out_t{};
} }
else if constexpr (std::is_same_v<Functional_t, AuVoidFunc>) else if constexpr (std::is_same_v<Functional_t, AuVoidFunc>)
{ {
func(); func();
return Out_t{};
} }
else if constexpr (std::is_same_v<Functional_t, AuSupplierConsumer<Out_t, const In_t &>>) else if constexpr (std::is_same_v<Functional_t, AuSupplierConsumer<Out_t, const In_t &>>)
{ {
@ -182,7 +179,6 @@ namespace Aurora::Async
else if constexpr (std::is_same_v<Functional_t, AuConsumer<const In_t &>>) else if constexpr (std::is_same_v<Functional_t, AuConsumer<const In_t &>>)
{ {
func(a); func(a);
return Out_t{};
} }
return Out_t{}; return Out_t{};
}; };