CScriptObject: Mark IsEditorProperty() as const

This doesn't modify internal member state.
This commit is contained in:
Lioncash 2020-06-18 07:23:08 -04:00
parent 6f1d6a8649
commit 132d452c88
2 changed files with 12 additions and 13 deletions

View File

@ -79,19 +79,18 @@ void CScriptObject::EvaluateVolume()
mVolumeScale = mpTemplate->VolumeScale(this); mVolumeScale = mpTemplate->VolumeScale(this);
} }
bool CScriptObject::IsEditorProperty(IProperty *pProp) bool CScriptObject::IsEditorProperty(const IProperty *pProp) const
{ {
return ( (pProp == mInstanceName.Property()) || return pProp == mInstanceName.Property() ||
(pProp == mPosition.Property()) || pProp == mPosition.Property() ||
(pProp == mRotation.Property()) || pProp == mRotation.Property() ||
(pProp == mScale.Property()) || pProp == mScale.Property() ||
(pProp == mActive.Property()) || pProp == mActive.Property() ||
(pProp == mLightParameters.Property()) || pProp == mLightParameters.Property() ||
(pProp->Parent() == mPosition.Property()) || pProp->Parent() == mPosition.Property() ||
(pProp->Parent() == mRotation.Property()) || pProp->Parent() == mRotation.Property() ||
(pProp->Parent() == mScale.Property()) || pProp->Parent() == mScale.Property() ||
(pProp->Parent() == mLightParameters.Property()) pProp->Parent() == mLightParameters.Property();
);
} }
void CScriptObject::SetLayer(CScriptLayer *pLayer, uint32 NewLayerIndex) void CScriptObject::SetLayer(CScriptLayer *pLayer, uint32 NewLayerIndex)

View File

@ -72,7 +72,7 @@ public:
void EvaluateDisplayAsset(); void EvaluateDisplayAsset();
void EvaluateCollisionModel(); void EvaluateCollisionModel();
void EvaluateVolume(); void EvaluateVolume();
bool IsEditorProperty(IProperty *pProp); bool IsEditorProperty(const IProperty *pProp) const;
void SetLayer(CScriptLayer *pLayer, uint32 NewLayerIndex = UINT32_MAX); void SetLayer(CScriptLayer *pLayer, uint32 NewLayerIndex = UINT32_MAX);
uint32 LayerIndex() const; uint32 LayerIndex() const;
bool HasNearVisibleActivation() const; bool HasNearVisibleActivation() const;