From 4b2c55b82b7c68ccbc63bc2c71e13f03a2db2a46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Lam?= Date: Fri, 25 Mar 2022 21:33:00 +0100 Subject: Use sead::Buffer::fill where applicable Equivalent, shorter, more readable, and matching! --- src/KingSystem/Resource/Actor/resResourceASResource.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/KingSystem/Resource/Actor/resResourceASResource.cpp') 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(it.getIndex()); -- cgit v1.2.3