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

@ -1091,7 +1091,7 @@ F32 GuiMeshRoadEditorCtrl::getNodeDepth()
return 0.0f;
}
void GuiMeshRoadEditorCtrl::setNodePosition( Point3F pos )
void GuiMeshRoadEditorCtrl::setNodePosition(const Point3F& pos)
{
if ( mSelRoad && mSelNode != -1 )
{

View file

@ -100,7 +100,7 @@ class GuiMeshRoadEditorCtrl : public EditTSCtrl
void setNodeDepth( F32 depth );
Point3F getNodePosition();
void setNodePosition( Point3F pos );
void setNodePosition(const Point3F& pos);
VectorF getNodeNormal();
void setNodeNormal( const VectorF &normal );

View file

@ -1235,7 +1235,7 @@ F32 GuiRiverEditorCtrl::getNodeDepth()
return 0.0f;
}
void GuiRiverEditorCtrl::setNodePosition( Point3F pos )
void GuiRiverEditorCtrl::setNodePosition(const Point3F& pos)
{
if ( mSelRiver && mSelNode != -1 )
{

View file

@ -110,7 +110,7 @@ class GuiRiverEditorCtrl : public EditTSCtrl
void setNodeDepth( F32 depth );
Point3F getNodePosition();
void setNodePosition( Point3F pos );
void setNodePosition(const Point3F& pos);
VectorF getNodeNormal();
void setNodeNormal( const VectorF &normal );

View file

@ -979,7 +979,7 @@ F32 GuiRoadEditorCtrl::getNodeWidth()
return 0.0f;
}
void GuiRoadEditorCtrl::setNodePosition( Point3F pos )
void GuiRoadEditorCtrl::setNodePosition(const Point3F& pos)
{
if ( mSelRoad && mSelNode != -1 )
{

View file

@ -97,7 +97,7 @@ class GuiRoadEditorCtrl : public EditTSCtrl
void setNodeWidth( F32 width );
Point3F getNodePosition();
void setNodePosition( Point3F pos );
void setNodePosition(const Point3F& pos);
void setTextureFile( StringTableEntry file );