mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-06-24 05:53:28 +00:00
CArtifactDoll: Collapse loop into std::all_of
Same thing, but directly stores to a variable.
This commit is contained in:
parent
7a8edc8d5e
commit
c4ad797953
@ -164,12 +164,15 @@ void CArtifactDoll::Touch() {
|
||||
}
|
||||
|
||||
bool CArtifactDoll::CheckLoadComplete() {
|
||||
if (IsLoaded())
|
||||
if (IsLoaded()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
for (TLockedToken<CModel>& model : x0_models)
|
||||
if (!model.IsLoaded())
|
||||
return false;
|
||||
const bool allLoaded =
|
||||
std::all_of(x0_models.cbegin(), x0_models.cend(), [](const auto& model) { return model.IsLoaded(); });
|
||||
if (!allLoaded) {
|
||||
return false;
|
||||
}
|
||||
|
||||
x28_24_loaded = true;
|
||||
return true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user