mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-06-24 11:53:29 +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() {
|
bool CArtifactDoll::CheckLoadComplete() {
|
||||||
if (IsLoaded())
|
if (IsLoaded()) {
|
||||||
return true;
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
for (TLockedToken<CModel>& model : x0_models)
|
const bool allLoaded =
|
||||||
if (!model.IsLoaded())
|
std::all_of(x0_models.cbegin(), x0_models.cend(), [](const auto& model) { return model.IsLoaded(); });
|
||||||
return false;
|
if (!allLoaded) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
x28_24_loaded = true;
|
x28_24_loaded = true;
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user