From 16f7d2d675a23f6fa0b4f00d4b19f4ced4af7bd4 Mon Sep 17 00:00:00 2001 From: "techdragon.nguyen@gmail.com" Date: Mon, 14 Feb 2011 17:38:57 +0000 Subject: [PATCH] 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. --- projects/mtg/src/DeckMenu.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/mtg/src/DeckMenu.cpp b/projects/mtg/src/DeckMenu.cpp index 360d8699b..02262d355 100644 --- a/projects/mtg/src/DeckMenu.cpp +++ b/projects/mtg/src/DeckMenu.cpp @@ -215,7 +215,7 @@ void DeckMenu::Render() if (currentMenuItem->mY - kLineHeight * startId < mY + height - kLineHeight + 7) { // only load stats for visible items in the list - if (currentMenuItem->meta) + if (currentMenuItem->meta && !currentMenuItem->meta->mStatsLoaded) { currentMenuItem->meta->LoadStats(); }