diff options
| author | Léo Lam <leo@leolam.fr> | 2022-03-25 21:33:00 +0100 |
|---|---|---|
| committer | Léo Lam <leo@leolam.fr> | 2022-03-25 21:34:03 +0100 |
| commit | 4b2c55b82b7c68ccbc63bc2c71e13f03a2db2a46 (patch) | |
| tree | 23f231e04333adde16fa5253fd458cc4ccb453d9 /src/KingSystem/Resource/Actor/resResourceASResource.cpp | |
| parent | 0e8cad1d0d9a4198c025babf2c43461d1d247ff6 (diff) | |
Use sead::Buffer::fill where applicable
Equivalent, shorter, more readable, and matching!
Diffstat (limited to 'src/KingSystem/Resource/Actor/resResourceASResource.cpp')
| -rw-r--r-- | src/KingSystem/Resource/Actor/resResourceASResource.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/KingSystem/Resource/Actor/resResourceASResource.cpp b/src/KingSystem/Resource/Actor/resResourceASResource.cpp index e6b2be31..00e41a05 100644 --- a/src/KingSystem/Resource/Actor/resResourceASResource.cpp +++ b/src/KingSystem/Resource/Actor/resResourceASResource.cpp @@ -228,8 +228,7 @@ bool ASResourceWithChildren::doParse(const ASResource::ParseArgs& args) { if (!mChildren.tryAllocBuffer(size, args.heap)) return false; - for (int i = 0, n = mChildren.size(); i < n; ++i) - mChildren(i) = nullptr; + mChildren.fill(nullptr); for (auto it = mChildren.begin(), end = mChildren.end(); it != end; ++it) { const auto idx = *Children.getParameterData<int>(it.getIndex()); |
