1
0
Fork 0
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:
fgenesis 2024-07-13 06:48:30 +02:00
parent 1573eea051
commit a046038c33

View file

@ -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)
{ {