Optimize alignNum

This commit is contained in:
mmcomando 2018-09-10 21:38:36 +02:00
parent 9c5a60447c
commit 2069e7b420

View file

@ -124,11 +124,7 @@ class EntityManager
static void alignNum(ref ushort num, ushort aligment)
{
int reminder = num % aligment;
if (reminder != 0)
{
num += aligment - reminder;
}
num += aligment - (num & (aligment-1));
}
EntityTemplate* allocateTemplate(ushort[] components_ids)