Core/ApplicationBase: Fix compilation with Apple Clang
This commit is contained in:
parent
de5e7bd8a8
commit
445ed93fbb
|
|
@ -52,7 +52,7 @@ namespace Nz
|
|||
template<typename T, typename... Args> T& AddComponent(Args&&... args);
|
||||
|
||||
private:
|
||||
template<typename F, bool FixedInterval> void AddUpdaterFunc(Time interval, F&& functor);
|
||||
template<typename F, bool Fixed> void AddUpdaterFunc(Time interval, F&& functor);
|
||||
|
||||
struct Updater
|
||||
{
|
||||
|
|
|
|||
|
|
@ -93,17 +93,16 @@ namespace Nz
|
|||
return componentRef;
|
||||
}
|
||||
|
||||
template<typename F, bool FixedInterval>
|
||||
template<typename F, bool Fixed>
|
||||
void ApplicationBase::AddUpdaterFunc(Time interval, F&& functor)
|
||||
{
|
||||
if constexpr (std::is_invocable_r_v<void, F> || std::is_invocable_r_v<void, F, Time>)
|
||||
return AddUpdater(std::make_unique<ApplicationUpdaterFunctorWithInterval<std::decay_t<F>, FixedInterval>>(std::forward<F>(functor), interval));
|
||||
return AddUpdater(std::make_unique<ApplicationUpdaterFunctorWithInterval<std::decay_t<F>, Fixed>>(std::forward<F>(functor), interval));
|
||||
else if constexpr (std::is_invocable_r_v<Time, F> || std::is_invocable_r_v<Time, F, Time>)
|
||||
return AddUpdater(std::make_unique<ApplicationUpdaterFunctor<std::decay_t<F>>>(std::forward<F>(functor)));
|
||||
else
|
||||
static_assert(AlwaysFalse<F>(), "functor must be callable with either elapsed time or nothing and return void or next update time");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#include <Nazara/Core/DebugOff.hpp>
|
||||
|
|
|
|||
Loading…
Reference in New Issue