CScriptActorRotate: Make use of insert_or_assign in UpdateActors()

Same behavior, minus potentially avoidable default constructions that
immediately get overwritten.
This commit is contained in:
Lioncash 2020-05-20 13:49:59 -04:00
parent 677ed1ce9a
commit 1049a1a590
1 changed files with 1 additions and 1 deletions

View File

@ -112,7 +112,7 @@ void CScriptActorRotate::UpdateActors(bool next, CStateManager& mgr) {
auto search = mgr.GetIdListForScript(conn.x8_objId); auto search = mgr.GetIdListForScript(conn.x8_objId);
for (auto it = search.first; it != search.second; ++it) { for (auto it = search.first; it != search.second; ++it) {
if (const TCastToConstPtr<CActor> act = mgr.ObjectById(it->second)) { if (const TCastToConstPtr<CActor> act = mgr.ObjectById(it->second)) {
x48_actors[it->second] = act->GetTransform().getRotation(); x48_actors.insert_or_assign(it->second, act->GetTransform().getRotation());
} }
} }
} }