From 9ac1a94a5fa50a8311ac5183da14792bb9b5cefb Mon Sep 17 00:00:00 2001 From: Lioncash Date: Fri, 3 Apr 2020 00:24:49 -0400 Subject: [PATCH] CActorModelParticles: Add non-const overload of FindSystem() Same behavior but returns a non-const iterator, which will be used in a following change. --- Runtime/World/CActorModelParticles.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Runtime/World/CActorModelParticles.cpp b/Runtime/World/CActorModelParticles.cpp index fc71f6966..d9fe51a7c 100644 --- a/Runtime/World/CActorModelParticles.cpp +++ b/Runtime/World/CActorModelParticles.cpp @@ -528,6 +528,10 @@ void CActorModelParticles::SetupHook(TUniqueId uid) { CSkinnedModel::SetPointGeneratorFunc((void*)&*search, PointGenerator); } +std::list::iterator CActorModelParticles::FindSystem(TUniqueId uid) { + return std::find_if(x0_items.begin(), x0_items.end(), [uid](const auto& entry) { return entry.x0_id == uid; }); +} + std::list::const_iterator CActorModelParticles::FindSystem(TUniqueId uid) const { return std::find_if(x0_items.begin(), x0_items.end(), [uid](const auto& entry) { return entry.x0_id == uid; }); }