From 70c3a7ddf50eb02bdee1e7eed482d5d8176e8ce9 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Tue, 3 Mar 2020 06:30:18 -0500 Subject: [PATCH] CScriptGunTurret: Remove unnecessary data() call in AcceptScriptMsg() We can use append() instead of data(). This allows the size of the string view instance to be used directly instead of redundantly doing a string size lookup. --- Runtime/World/CScriptGunTurret.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Runtime/World/CScriptGunTurret.cpp b/Runtime/World/CScriptGunTurret.cpp index 9bc9dc430..38def4800 100644 --- a/Runtime/World/CScriptGunTurret.cpp +++ b/Runtime/World/CScriptGunTurret.cpp @@ -174,7 +174,7 @@ void CScriptGunTurret::AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId uid, if (x478_targettingLight->SystemHasLight()) { x498_lightId = mgr.AllocateUniqueId(); mgr.AddObject(new CGameLight(x498_lightId, GetAreaIdAlways(), GetActive(), - std::string("ParticleLight_") + GetName().data(), GetTransform(), GetUniqueId(), + std::string("ParticleLight_").append(GetName()), GetTransform(), GetUniqueId(), x478_targettingLight->GetLight(), 0, 1, 0.f)); } SetupCollisionManager(mgr);