From 3951a07bfa86c7976806cbcecb7cf16fc389c113 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Tue, 15 Oct 2019 09:12:58 -0400 Subject: [PATCH] CLogBookScreen: Dehardcode constants where applicable We can just query the containers for the iteration value --- Runtime/MP1/CLogBookScreen.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Runtime/MP1/CLogBookScreen.cpp b/Runtime/MP1/CLogBookScreen.cpp index 087faff80..b15635248 100644 --- a/Runtime/MP1/CLogBookScreen.cpp +++ b/Runtime/MP1/CLogBookScreen.cpp @@ -34,7 +34,7 @@ bool CLogBookScreen::IsScanComplete(CSaveWorld::EScanCategory category, CAssetId } void CLogBookScreen::InitializeLogBook() { - for (int i = 0; i < 5; ++i) { + for (size_t i = 0; i < x19c_scanCompletes.size(); ++i) { x19c_scanCompletes[i].reserve(g_MemoryCardSys->GetScanCategoryCount(CSaveWorld::EScanCategory(i + 1))); } @@ -345,7 +345,7 @@ void CLogBookScreen::Draw(float transInterp, float totalAlpha, float yOff) { bool CLogBookScreen::VReady() const { return true; } void CLogBookScreen::VActivate() { - for (int i = 0; i < 5; ++i) { + for (int i = 0; i < int(xa8_textpane_categories.size()); ++i) { if (IsScanCategoryReady(CSaveWorld::EScanCategory(i + 1))) { xa8_textpane_categories[i]->TextSupport().SetText(xc_pauseStrg.GetString(i + 1)); } else {