diff --git a/Runtime/MP1/CInGameGuiManager.cpp b/Runtime/MP1/CInGameGuiManager.cpp index 3b2dd393d..67c341650 100644 --- a/Runtime/MP1/CInGameGuiManager.cpp +++ b/Runtime/MP1/CInGameGuiManager.cpp @@ -1,5 +1,6 @@ #include "Runtime/MP1/CInGameGuiManager.hpp" +#include #include #include "Runtime/CDependencyGroup.hpp" @@ -47,13 +48,10 @@ std::vector> CInGameGuiManager::LockPauseScreenDe } bool CInGameGuiManager::CheckDGRPLoadComplete() const { - for (const auto& dgrp : x5c_pauseScreenDGRPs) - if (!dgrp.IsLoaded()) - return false; - for (const auto& dgrp : xc8_inGameGuiDGRPs) - if (!dgrp.IsLoaded()) - return false; - return true; + const auto isLoaded = [](const auto& entry) { return entry.IsLoaded(); }; + + return std::all_of(x5c_pauseScreenDGRPs.cbegin(), x5c_pauseScreenDGRPs.cend(), isLoaded) && + std::all_of(xc8_inGameGuiDGRPs.cbegin(), xc8_inGameGuiDGRPs.cend(), isLoaded); } void CInGameGuiManager::BeginStateTransition(EInGameGuiState state, CStateManager& stateMgr) {