const-correctness

This was SVN commit r7355.
This commit is contained in:
Ykkrosh
2010-03-17 22:51:47 +00:00
parent 5293aee71d
commit 79ea8213e5
4 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -158,7 +158,7 @@ void CMaterial::SetPlayerColor(size_t id)
m_PlayerID = id;
}
void CMaterial::SetPlayerColor(CColor& colour)
void CMaterial::SetPlayerColor(const CColor& colour)
{
m_TextureColor = SMaterialColor(colour.r, colour.g, colour.b, colour.a);
}
+1 -1
View File
@@ -93,7 +93,7 @@ public:
void SetPlayerColor_PerPlayer() { m_PlayerID = PLAYER_ID_COMING_SOON; }
void SetPlayerColor_PerObject() { m_PlayerID = PLAYER_ID_OTHER; }
void SetPlayerColor(size_t id);
void SetPlayerColor(CColor &colour);
void SetPlayerColor(const CColor &colour);
void SetTexture(const CStr& texture);
void SetVertexProgram(const CStr& prog);
+2 -2
View File
@@ -509,12 +509,12 @@ void CModel::SetPlayerID(size_t id)
it->m_Model->SetPlayerID(id);
}
void CModel::SetPlayerColor(CColor& colour)
void CModel::SetPlayerColor(const CColor& colour)
{
m_Material.SetPlayerColor(colour);
}
void CModel::SetShadingColor(CColor& colour)
void CModel::SetShadingColor(const CColor& colour)
{
m_ShadingColor = colour;
for( std::vector<Prop>::iterator it = m_Props.begin(); it != m_Props.end(); ++it )
+2 -2
View File
@@ -85,9 +85,9 @@ public:
// should normally be used instead.
void SetPlayerID(size_t id);
// set the model's player colour
void SetPlayerColor(CColor& colour);
void SetPlayerColor(const CColor& colour);
// set the models mod color
void SetShadingColor(CColor& colour);
void SetShadingColor(const CColor& colour);
// get the model's texture
CTexture* GetTexture() { return &m_Texture; }
// get the models material