Needless copy construction avoidance

This commit is contained in:
Jack Andersen 2016-04-20 09:23:00 -10:00
parent 8537ea5d8d
commit 519a07b7e7
3 changed files with 4 additions and 4 deletions

View File

@ -38,7 +38,7 @@ CStateManager::CStateManager(const std::weak_ptr<CScriptMailbox>&,
{ {
x904_loaderFuncs[int(EScriptObjectType::Actor)] = ScriptLoader::LoadActor; x904_loaderFuncs[int(EScriptObjectType::Actor)] = ScriptLoader::LoadActor;
x904_loaderFuncs[int(EScriptObjectType::Waypoint)] = ScriptLoader::LoadWaypoint; x904_loaderFuncs[int(EScriptObjectType::Waypoint)] = ScriptLoader::LoadWaypoint;
x904_loaderFuncs[int(EScriptObjectType::DoorArea)] = ScriptLoader::LoadDoor; x904_loaderFuncs[int(EScriptObjectType::Door)] = ScriptLoader::LoadDoor;
x904_loaderFuncs[int(EScriptObjectType::Trigger)] = ScriptLoader::LoadTrigger; x904_loaderFuncs[int(EScriptObjectType::Trigger)] = ScriptLoader::LoadTrigger;
x904_loaderFuncs[int(EScriptObjectType::Timer)] = ScriptLoader::LoadTimer; x904_loaderFuncs[int(EScriptObjectType::Timer)] = ScriptLoader::LoadTimer;
x904_loaderFuncs[int(EScriptObjectType::Counter)] = ScriptLoader::LoadCounter; x904_loaderFuncs[int(EScriptObjectType::Counter)] = ScriptLoader::LoadCounter;

View File

@ -96,7 +96,7 @@ static zeus::CAABox GetCollisionBox(CStateManager& stateMgr, TAreaId id,
const zeus::CVector3f& extent, const zeus::CVector3f& offset) const zeus::CVector3f& extent, const zeus::CVector3f& offset)
{ {
zeus::CAABox box(-extent * 0.5f + offset, extent * 0.5f + offset); zeus::CAABox box(-extent * 0.5f + offset, extent * 0.5f + offset);
zeus::CTransform rot = stateMgr.GetWorld()->GetGameAreas()[id]->GetTransform().getRotation(); const zeus::CTransform& rot = stateMgr.GetWorld()->GetGameAreas()[id]->GetTransform().getRotation();
return box.getTransformedAABox(rot); return box.getTransformedAABox(rot);
} }
@ -455,7 +455,7 @@ CEntity* ScriptLoader::LoadTrigger(CStateManager& mgr, CInputStream& in,
zeus::CAABox box(-extent * 0.5f, extent * 0.5f); zeus::CAABox box(-extent * 0.5f, extent * 0.5f);
zeus::CTransform areaXf = mgr.GetWorld()->GetGameAreas()[info.GetAreaId()]->GetTransform(); const zeus::CTransform& areaXf = mgr.GetWorld()->GetGameAreas()[info.GetAreaId()]->GetTransform();
zeus::CVector3f orientedForce = areaXf.m_basis * forceVec; zeus::CVector3f orientedForce = areaXf.m_basis * forceVec;
return new CScriptTrigger(mgr.AllocateUniqueId(), *name, info, position, box, dInfo, return new CScriptTrigger(mgr.AllocateUniqueId(), *name, info, position, box, dInfo,

View File

@ -8,7 +8,7 @@ enum class EScriptObjectType
{ {
Actor = 0x00, Actor = 0x00,
Waypoint = 0x02, Waypoint = 0x02,
DoorArea = 0x03, Door = 0x03,
Trigger = 0x04, Trigger = 0x04,
Timer = 0x05, Timer = 0x05,
Counter = 0x06, Counter = 0x06,