added conditional to avoid having to ping the stats map all the time. The data
is already cached, but there's no need to spend a function call to check the hashmap if we have a bool for that reason.
This commit is contained in:
@@ -215,7 +215,7 @@ void DeckMenu::Render()
|
|||||||
if (currentMenuItem->mY - kLineHeight * startId < mY + height - kLineHeight + 7)
|
if (currentMenuItem->mY - kLineHeight * startId < mY + height - kLineHeight + 7)
|
||||||
{
|
{
|
||||||
// only load stats for visible items in the list
|
// only load stats for visible items in the list
|
||||||
if (currentMenuItem->meta)
|
if (currentMenuItem->meta && !currentMenuItem->meta->mStatsLoaded)
|
||||||
{
|
{
|
||||||
currentMenuItem->meta->LoadStats();
|
currentMenuItem->meta->LoadStats();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user