World/CScript*: Pass by reference over by value

Based off the use of the const, it's likely that these were intended to
be references, rather than be copied by value
This commit is contained in:
Lioncash 2019-09-06 10:49:51 -04:00
parent fea7984f71
commit 2c6aed7033
4 changed files with 4 additions and 4 deletions

View File

@ -18,7 +18,7 @@ CMaterialList MakeDockMaterialList() {
return list; return list;
} }
CScriptDock::CScriptDock(TUniqueId uid, std::string_view name, const CEntityInfo& info, const zeus::CVector3f position, CScriptDock::CScriptDock(TUniqueId uid, std::string_view name, const CEntityInfo& info, const zeus::CVector3f& position,
const zeus::CVector3f& extents, s32 dock, TAreaId area, bool active, s32 dockReferenceCount, const zeus::CVector3f& extents, s32 dock, TAreaId area, bool active, s32 dockReferenceCount,
bool loadConnected) bool loadConnected)
: CPhysicsActor(uid, active, name, info, zeus::CTransform(zeus::CMatrix3f(), position), : CPhysicsActor(uid, active, name, info, zeus::CTransform(zeus::CMatrix3f(), position),

View File

@ -22,7 +22,7 @@ class CScriptDock : public CPhysicsActor {
}; };
public: public:
CScriptDock(TUniqueId uid, std::string_view name, const CEntityInfo& info, const zeus::CVector3f position, CScriptDock(TUniqueId uid, std::string_view name, const CEntityInfo& info, const zeus::CVector3f& position,
const zeus::CVector3f& extent, s32 dock, TAreaId area, bool active, s32 dockReferenceCount, const zeus::CVector3f& extent, s32 dock, TAreaId area, bool active, s32 dockReferenceCount,
bool loadConnected); bool loadConnected);

View File

@ -6,7 +6,7 @@
namespace urde { namespace urde {
CScriptPointOfInterest::CScriptPointOfInterest(TUniqueId uid, std::string_view name, const CEntityInfo info, CScriptPointOfInterest::CScriptPointOfInterest(TUniqueId uid, std::string_view name, const CEntityInfo& info,
const zeus::CTransform& xf, bool active, const zeus::CTransform& xf, bool active,
const CScannableParameters& parms, float f1) const CScannableParameters& parms, float f1)
: CActor(uid, active, name, info, xf, CModelData::CModelDataNull(), CMaterialList(u64(EMaterialTypes::Orbit)), : CActor(uid, active, name, info, xf, CModelData::CModelDataNull(), CMaterialList(u64(EMaterialTypes::Orbit)),

View File

@ -9,7 +9,7 @@ private:
float xe8_pointSize; float xe8_pointSize;
public: public:
CScriptPointOfInterest(TUniqueId, std::string_view, const CEntityInfo, const zeus::CTransform&, bool, CScriptPointOfInterest(TUniqueId, std::string_view, const CEntityInfo&, const zeus::CTransform&, bool,
const CScannableParameters&, float); const CScannableParameters&, float);
void Accept(IVisitor& visitor) override; void Accept(IVisitor& visitor) override;