CLightNode: Mark member functions as const where applicable

Several functions don't modify internal member state.
This commit is contained in:
Lioncash 2020-06-14 19:13:32 -04:00
parent f2201ca03c
commit cec88d182b
2 changed files with 4 additions and 8 deletions

View File

@ -138,12 +138,7 @@ void CLightNode::PropertyModified(IProperty* pProperty)
SetPosition( mpLight->Position() );
}
CLight* CLightNode::Light()
{
return mpLight;
}
CVector2f CLightNode::BillboardScale()
CVector2f CLightNode::BillboardScale() const
{
return AbsoluteScale().XZ() * 0.75f;
}

View File

@ -18,8 +18,9 @@ public:
CStructRef GetProperties() const override;
void PropertyModified(IProperty* pProperty) override;
bool AllowsRotate() const override { return false; }
CLight* Light();
CVector2f BillboardScale();
CLight* Light() { return mpLight; }
const CLight* Light() const { return mpLight; }
CVector2f BillboardScale() const;
protected:
void CalculateTransform(CTransform4f& rOut) const override;