Merge branch 'export_id' into 'master'

Export id generated by becsID

See merge request Mergul/bubel-ecs!24
This commit is contained in:
Dawid Masiukiewicz 2022-11-10 09:28:34 +00:00
commit 881d6d113b

View file

@ -11,8 +11,11 @@ import std.traits;
*/ */
ref ushort becsID(T)() ref ushort becsID(T)()
{ {
__gshared ushort id = ushort.max; /// Embed id in struct so export can be added to variable definition
return id; static struct LocalStruct {
export __gshared ushort id = ushort.max;
}
return LocalStruct.id;
} }
/************************************************************************************************************************ /************************************************************************************************************************