CActorModelParticles: Add non-const overload of FindSystem()

Same behavior but returns a non-const iterator, which will be used in a
following change.
This commit is contained in:
Lioncash 2020-04-03 00:24:49 -04:00
parent b33fcf9e02
commit 9ac1a94a5f
1 changed files with 4 additions and 0 deletions

View File

@ -528,6 +528,10 @@ void CActorModelParticles::SetupHook(TUniqueId uid) {
CSkinnedModel::SetPointGeneratorFunc((void*)&*search, PointGenerator);
}
std::list<CActorModelParticles::CItem>::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<CActorModelParticles::CItem>::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; });
}