From 8c3f77df8a98b4345541c157d93b7628cf2248ee Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sun, 21 Jun 2020 02:37:39 -0400 Subject: [PATCH] CDamageableTriggerExtra: Mark member functions as const where applicable These don't modify instance state. --- src/Core/ScriptExtra/CDamageableTriggerExtra.cpp | 4 ++-- src/Core/ScriptExtra/CDamageableTriggerExtra.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Core/ScriptExtra/CDamageableTriggerExtra.cpp b/src/Core/ScriptExtra/CDamageableTriggerExtra.cpp index 9acc7bcf..7400c472 100644 --- a/src/Core/ScriptExtra/CDamageableTriggerExtra.cpp +++ b/src/Core/ScriptExtra/CDamageableTriggerExtra.cpp @@ -126,7 +126,7 @@ void CDamageableTriggerExtra::UpdatePlaneTransform() MarkTransformChanged(); } -CDamageableTriggerExtra::ERenderSide CDamageableTriggerExtra::RenderSideForDirection(const CVector3f& rkDir) +CDamageableTriggerExtra::ERenderSide CDamageableTriggerExtra::RenderSideForDirection(const CVector3f& rkDir) const { // Get the index of the largest XYZ component const CVector3f AbsDir(Math::Abs(rkDir.X), Math::Abs(rkDir.Y), Math::Abs(rkDir.Z)); @@ -144,7 +144,7 @@ CDamageableTriggerExtra::ERenderSide CDamageableTriggerExtra::RenderSideForDirec return ERenderSide::NoRender; } -CDamageableTriggerExtra::ERenderSide CDamageableTriggerExtra::TransformRenderSide(ERenderSide Side) +CDamageableTriggerExtra::ERenderSide CDamageableTriggerExtra::TransformRenderSide(ERenderSide Side) const { // DamageableTrigger has a convenience feature implemented that changes the // render side when the area's been rotated, so we need to replicate it here. diff --git a/src/Core/ScriptExtra/CDamageableTriggerExtra.h b/src/Core/ScriptExtra/CDamageableTriggerExtra.h index 8e5ecdfb..e787863e 100644 --- a/src/Core/ScriptExtra/CDamageableTriggerExtra.h +++ b/src/Core/ScriptExtra/CDamageableTriggerExtra.h @@ -36,8 +36,8 @@ public: ~CDamageableTriggerExtra() override; void CreateMaterial(); void UpdatePlaneTransform(); - ERenderSide RenderSideForDirection(const CVector3f& rkDir); - ERenderSide TransformRenderSide(ERenderSide Side); + ERenderSide RenderSideForDirection(const CVector3f& rkDir) const; + ERenderSide TransformRenderSide(ERenderSide Side) const; void OnTransformed() override; void PropertyModified(IProperty* pProperty) override; bool ShouldDrawNormalAssets() override;