CActorModelParticles: Don't cast away const in SetupHook()

Now that we have a non-const overload, we don't need to cast away const
any longer, removing a cast-qual warning.
This commit is contained in:
Lioncash 2020-04-03 00:26:32 -04:00
parent 9ac1a94a5f
commit a80838b2df
1 changed files with 7 additions and 3 deletions

View File

@ -523,9 +523,13 @@ void CActorModelParticles::PointGenerator(void* ctx,
}
void CActorModelParticles::SetupHook(TUniqueId uid) {
auto search = FindSystem(uid);
if (search != x0_items.cend())
CSkinnedModel::SetPointGeneratorFunc((void*)&*search, PointGenerator);
const auto search = FindSystem(uid);
if (search == x0_items.cend()) {
return;
}
CSkinnedModel::SetPointGeneratorFunc(&*search, PointGenerator);
}
std::list<CActorModelParticles::CItem>::iterator CActorModelParticles::FindSystem(TUniqueId uid) {