From 1049a1a590f723d3150adcbf2d7d98c9eb7dfc90 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Wed, 20 May 2020 13:49:59 -0400 Subject: [PATCH] CScriptActorRotate: Make use of insert_or_assign in UpdateActors() Same behavior, minus potentially avoidable default constructions that immediately get overwritten. --- Runtime/World/CScriptActorRotate.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Runtime/World/CScriptActorRotate.cpp b/Runtime/World/CScriptActorRotate.cpp index fa013b431..1f1333cfe 100644 --- a/Runtime/World/CScriptActorRotate.cpp +++ b/Runtime/World/CScriptActorRotate.cpp @@ -112,7 +112,7 @@ void CScriptActorRotate::UpdateActors(bool next, CStateManager& mgr) { auto search = mgr.GetIdListForScript(conn.x8_objId); for (auto it = search.first; it != search.second; ++it) { if (const TCastToConstPtr act = mgr.ObjectById(it->second)) { - x48_actors[it->second] = act->GetTransform().getRotation(); + x48_actors.insert_or_assign(it->second, act->GetTransform().getRotation()); } } }