Optimize alignNum
This commit is contained in:
parent
9c5a60447c
commit
2069e7b420
1 changed files with 1 additions and 5 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue