-almost every funtion is marked as @nogc and nothrow (only problem with HashMap)
This commit is contained in:
parent
fef55bd790
commit
204ce9dc79
10 changed files with 74 additions and 72 deletions
|
|
@ -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]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue