Simplify expression

meow-7.2.2
Ansariel 2024-01-09 09:42:42 +01:00 committed by Andrey Lihatskiy
parent ba74152c82
commit b3bb13b006
1 changed files with 2 additions and 2 deletions

View File

@ -408,9 +408,9 @@ void LLLayoutStack::updateLayout()
llassert(total_visible_fraction < 1.05f);
// don't need spacing after last panel
if (!mPanels.empty())
{
LLLayoutPanel* panelp = mPanels.empty() ? nullptr : mPanels.back();
space_to_distribute += panelp ? ll_round((F32)mPanelSpacing * panelp->getVisibleAmount()) : 0;
space_to_distribute += ll_round(F32(mPanelSpacing) * mPanels.back()->getVisibleAmount());
}
S32 remaining_space = space_to_distribute;