mirror of
https://github.com/Kiritow/MiniEngine.git
synced 2024-03-22 13:11:22 +08:00
Fix bug in class Timer (VoidCallable Constructor)
This commit is contained in:
parent
6c4f1c345d
commit
a7ab24d8ab
|
@ -514,7 +514,7 @@ namespace MiniEngine
|
||||||
template<typename VoidCallable,typename... Args>
|
template<typename VoidCallable,typename... Args>
|
||||||
Timer(Uint32 interval,VoidCallable&& vcallable,Args&&... args) : Timer()
|
Timer(Uint32 interval,VoidCallable&& vcallable,Args&&... args) : Timer()
|
||||||
{
|
{
|
||||||
auto realCall=[&](Uint32 ims)->Uint32{vcallable(ims,args...);return interval;};
|
auto realCall=[&](Uint32 ims)->Uint32{vcallable(ims,args...);return ims;};
|
||||||
auto pfunc=new std::function<Uint32(Uint32 interval)>(realCall);
|
auto pfunc=new std::function<Uint32(Uint32 interval)>(realCall);
|
||||||
_real_timer_call(_global_timer_executor,interval,pfunc);
|
_real_timer_call(_global_timer_executor,interval,pfunc);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user