CLightNode: Mark member functions as const where applicable
Several functions don't modify internal member state.
This commit is contained in:
parent
f2201ca03c
commit
cec88d182b
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue