-almost every funtion is marked as @nogc and nothrow (only problem with HashMap)

This commit is contained in:
Mergul 2018-11-02 16:36:38 +01:00
parent fef55bd790
commit 204ce9dc79
10 changed files with 74 additions and 72 deletions

View file

@ -24,7 +24,7 @@ struct Entity
/************************************************************************************************************************
*Update pointer to it in IDManager
*/
void updateID()
void updateID() nothrow @nogc
{
EntityManager.instance.id_manager.update(this);
}
@ -60,7 +60,7 @@ export struct EntityTemplate
/************************************************************************************************************************
*Get specified component. If component doesn't exist function return null.
*/
T* getComponent(T)()
T* getComponent(T)() nothrow @nogc
{
if(T.component_id >= info.tmpl_deltas.length)return null;
return cast(T*)(entity_data.ptr + info.tmpl_deltas[T.component_id]);