mirror of https://github.com/AxioDL/metaforce.git
CLogBookScreen: Make use of std::any_of within IsScanCategoryReady()
Same thing but collapses into a single return.
This commit is contained in:
parent
251a2a7723
commit
d64824d3e5
|
@ -159,16 +159,19 @@ void CLogBookScreen::PumpArticleLoad() {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CLogBookScreen::IsScanCategoryReady(CSaveWorld::EScanCategory category) const {
|
bool CLogBookScreen::IsScanCategoryReady(CSaveWorld::EScanCategory category) const {
|
||||||
CPlayerState& playerState = *x4_mgr.GetPlayerState();
|
const CPlayerState& playerState = *x4_mgr.GetPlayerState();
|
||||||
for (const std::pair<CAssetId, CSaveWorld::EScanCategory>& scanState : g_MemoryCardSys->GetScanStates()) {
|
const auto& scanState = g_MemoryCardSys->GetScanStates();
|
||||||
if (scanState.second != category)
|
|
||||||
continue;
|
return std::any_of(scanState.cbegin(), scanState.cend(), [category, &playerState](const auto& state) {
|
||||||
if (IsScanComplete(scanState.second, scanState.first, playerState))
|
if (state.second != category) {
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return IsScanComplete(state.second, state.first, playerState);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void CLogBookScreen::UpdateBodyText() {
|
void CLogBookScreen::UpdateBodyText() {
|
||||||
if (x10_mode != EMode::TextScroll) {
|
if (x10_mode != EMode::TextScroll) {
|
||||||
x174_textpane_body->TextSupport().SetText(u"");
|
x174_textpane_body->TextSupport().SetText(u"");
|
||||||
|
|
Loading…
Reference in New Issue