Workaround for issue with hasMember and opDispatch
This commit is contained in:
parent
3a3a9e0341
commit
cd1f81127a
1 changed files with 2 additions and 2 deletions
|
|
@ -1305,7 +1305,7 @@ export struct EntityManager
|
|||
// static assert(0, "Add \"mixin ECS.Component;\" in top of component structure;");
|
||||
// }
|
||||
|
||||
static if (hasMember!(Comp, "onDestroy") && isFunction!(Comp.onDestroy)
|
||||
static if (__traits(hasMember, Comp.init, "onDestroy") && isFunction!(Comp.onDestroy)
|
||||
&& is(ReturnType!(Comp.onDestroy) == void)
|
||||
&& Parameters!(Comp.onDestroy).length == 0)
|
||||
{
|
||||
|
|
@ -1317,7 +1317,7 @@ export struct EntityManager
|
|||
info.destroy_callback = &callDestroy;
|
||||
}
|
||||
|
||||
static if (hasMember!(Comp, "onCreate") && isFunction!(Comp.onCreate)
|
||||
static if (__traits(hasMember, Comp.init, "onCreate") && isFunction!(Comp.onCreate)
|
||||
&& is(ReturnType!(Comp.onCreate) == void) && Parameters!(Comp.onCreate).length == 0)
|
||||
{
|
||||
static void callCreate(void* pointer) nothrow @nogc
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue