From 306d163613c6940e73ad58e852b42cdb236a5bc4 Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Sat, 23 Apr 2022 14:40:51 +0200 Subject: return const refs + vec constantize --- src/helpers/AnimatedVariable.hpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/helpers/AnimatedVariable.hpp') diff --git a/src/helpers/AnimatedVariable.hpp b/src/helpers/AnimatedVariable.hpp index d6e058f0..ccdd78e3 100644 --- a/src/helpers/AnimatedVariable.hpp +++ b/src/helpers/AnimatedVariable.hpp @@ -22,37 +22,37 @@ public: ~CAnimatedVariable(); // gets the current vector value (real time) - Vector2D vec() { + const Vector2D& vec() const { ASSERT(m_eVarType == AVARTYPE_VECTOR); return m_vValue; } // gets the current float value (real time) - float fl() { + const float& fl() const { ASSERT(m_eVarType == AVARTYPE_FLOAT); return m_fValue; } // gets the current color value (real time) - CColor col() { + const CColor& col() const { ASSERT(m_eVarType == AVARTYPE_COLOR); return m_cValue; } // gets the goal vector value - Vector2D goalv() { + const Vector2D& goalv() const { ASSERT(m_eVarType == AVARTYPE_VECTOR); return m_vGoal; } // gets the goal float value - float goalf() { + const float& goalf() const { ASSERT(m_eVarType == AVARTYPE_FLOAT); return m_fGoal; } // gets the goal color value - CColor goalc() { + const CColor& goalc() const { ASSERT(m_eVarType == AVARTYPE_COLOR); return m_cGoal; } -- cgit v1.2.3