Syntax '*ptr = Structure.init' requires opAssign operator, get rid of this... #26
1 changed files with 2 additions and 1 deletions
|
|
@ -1307,7 +1307,8 @@ export struct EntityManager
|
|||
info.size = Comp.sizeof;
|
||||
info.alignment = Comp.alignof; //8;
|
||||
info.init_data = Mallocator.makeArray!ubyte(Comp.sizeof);
|
||||
*cast(Comp*) info.init_data.ptr = Comp.init; // = Comp();
|
||||
__gshared Comp init_memory;
|
||||
memcpy(info.init_data.ptr, &init_memory, Comp.sizeof);
|
||||
|
||||
ushort comp_id = components_map.get(cast(char[]) ComponentName, ushort.max);
|
||||
if (comp_id < components.length)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue