Issue found with PVS-Studio:

A lot of instances where some function args are not actually modified in any way, meaning that it is better for performance to convert them into const references. This prevents an additional copy, which can help performance.
This commit is contained in:
Areloch 2015-07-16 22:02:18 -05:00
parent ec63398042
commit 11398bb04e
40 changed files with 59 additions and 59 deletions

View file

@ -1192,13 +1192,13 @@ void ShapeBase::onDeleteNotify( SimObject *obj )
Parent::onDeleteNotify( obj );
}
void ShapeBase::onImpact(SceneObject* obj, VectorF vec)
void ShapeBase::onImpact(SceneObject* obj, const VectorF& vec)
{
if (!isGhost())
mDataBlock->onImpact_callback( this, obj, vec, vec.len() );
}
void ShapeBase::onImpact(VectorF vec)
void ShapeBase::onImpact(const VectorF& vec)
{
if (!isGhost())
mDataBlock->onImpact_callback( this, NULL, vec, vec.len() );
@ -1995,7 +1995,7 @@ void ShapeBase::getEyeCameraTransform(IDisplayDevice *displayDevice, U32 eyeId,
*outMat = temp;
}
DisplayPose ShapeBase::calcCameraDeltaPose(GameConnection *con, DisplayPose inPose)
DisplayPose ShapeBase::calcCameraDeltaPose(GameConnection *con, const DisplayPose& inPose)
{
// NOTE: this is intended to be similar to updateMove
// WARNING: does not take into account any move values