mirror of
https://github.com/AquariaOSE/Aquaria.git
synced 2025-02-03 18:14:01 +00:00
very minor perf thing: skip some RenderObject child checks when there are no children
This commit is contained in:
parent
1573eea051
commit
a046038c33
1 changed files with 31 additions and 28 deletions
|
@ -749,6 +749,8 @@ void RenderObject::onUpdate(float dt)
|
||||||
internalOffset.update(dt);
|
internalOffset.update(dt);
|
||||||
rotationOffset.update(dt);
|
rotationOffset.update(dt);
|
||||||
|
|
||||||
|
if(!children.empty())
|
||||||
|
{
|
||||||
bool hasChildrenToDelete = false;
|
bool hasChildrenToDelete = false;
|
||||||
for (Children::iterator i = children.begin(); i != children.end(); i++)
|
for (Children::iterator i = children.begin(); i != children.end(); i++)
|
||||||
{
|
{
|
||||||
|
@ -784,6 +786,7 @@ void RenderObject::onUpdate(float dt)
|
||||||
}
|
}
|
||||||
children.resize(w);
|
children.resize(w);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (MotionBlurData *mb = this->motionBlur)
|
if (MotionBlurData *mb = this->motionBlur)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue