mirror of https://github.com/AxioDL/metaforce.git
CInGameGuiManager: Make use of std::all_of in CheckDGRPLoadComplete()
When ranges are implemented in all compilers, we can simplify this significantly.
This commit is contained in:
parent
b6473bd225
commit
6703529445
|
@ -1,5 +1,6 @@
|
||||||
#include "Runtime/MP1/CInGameGuiManager.hpp"
|
#include "Runtime/MP1/CInGameGuiManager.hpp"
|
||||||
|
|
||||||
|
#include <algorithm>
|
||||||
#include <array>
|
#include <array>
|
||||||
|
|
||||||
#include "Runtime/CDependencyGroup.hpp"
|
#include "Runtime/CDependencyGroup.hpp"
|
||||||
|
@ -47,13 +48,10 @@ std::vector<TLockedToken<CDependencyGroup>> CInGameGuiManager::LockPauseScreenDe
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CInGameGuiManager::CheckDGRPLoadComplete() const {
|
bool CInGameGuiManager::CheckDGRPLoadComplete() const {
|
||||||
for (const auto& dgrp : x5c_pauseScreenDGRPs)
|
const auto isLoaded = [](const auto& entry) { return entry.IsLoaded(); };
|
||||||
if (!dgrp.IsLoaded())
|
|
||||||
return false;
|
return std::all_of(x5c_pauseScreenDGRPs.cbegin(), x5c_pauseScreenDGRPs.cend(), isLoaded) &&
|
||||||
for (const auto& dgrp : xc8_inGameGuiDGRPs)
|
std::all_of(xc8_inGameGuiDGRPs.cbegin(), xc8_inGameGuiDGRPs.cend(), isLoaded);
|
||||||
if (!dgrp.IsLoaded())
|
|
||||||
return false;
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CInGameGuiManager::BeginStateTransition(EInGameGuiState state, CStateManager& stateMgr) {
|
void CInGameGuiManager::BeginStateTransition(EInGameGuiState state, CStateManager& stateMgr) {
|
||||||
|
|
Loading…
Reference in New Issue