From 813aca9d20141783750d8e77f6482379c17722d3 Mon Sep 17 00:00:00 2001 From: Aaron Kimbre Date: Wed, 18 May 2022 06:36:21 -0500 Subject: [PATCH] resolve comments --- dGame/dComponents/SimplePhysicsComponent.cpp | 10 +++++----- dGame/dComponents/SimplePhysicsComponent.h | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/dGame/dComponents/SimplePhysicsComponent.cpp b/dGame/dComponents/SimplePhysicsComponent.cpp index 58bcee18..8a052313 100644 --- a/dGame/dComponents/SimplePhysicsComponent.cpp +++ b/dGame/dComponents/SimplePhysicsComponent.cpp @@ -18,15 +18,15 @@ SimplePhysicsComponent::SimplePhysicsComponent(uint32_t componentID, Entity* par m_Rotation = m_Parent->GetDefaultRotation(); m_IsDirty = true; - std::u16string climbable_type = m_Parent->GetVar(u"climbable"); + const auto& climbable_type = m_Parent->GetVar(u"climbable"); if (climbable_type == u"wall") { - SetClimbableType(CLIMBABLE_TYPE_WALL); + SetClimbableType(eClimbableType::CLIMBABLE_TYPE_WALL); } else if (climbable_type == u"ladder") { - SetClimbableType(CLIMBABLE_TYPE_LADDER); + SetClimbableType(eClimbableType::CLIMBABLE_TYPE_LADDER); } else if (climbable_type == u"wallstick") { - SetClimbableType(CLIMBABLE_TYPE_WALL_STICK); + SetClimbableType(eClimbableType::CLIMBABLE_TYPE_WALL_STICK); } else { - SetClimbableType(CLIMBABLE_TYPE_NOT); + SetClimbableType(eClimbableType::CLIMBABLE_TYPE_NOT); } } diff --git a/dGame/dComponents/SimplePhysicsComponent.h b/dGame/dComponents/SimplePhysicsComponent.h index 6ad4cac6..49e6be5b 100644 --- a/dGame/dComponents/SimplePhysicsComponent.h +++ b/dGame/dComponents/SimplePhysicsComponent.h @@ -14,7 +14,7 @@ class Entity; -enum eClimbableType : int32_t { +enum class eClimbableType : int32_t { CLIMBABLE_TYPE_NOT = 0, CLIMBABLE_TYPE_LADDER, CLIMBABLE_TYPE_WALL, @@ -146,7 +146,7 @@ private: /** * Whether or not the entity is climbable */ - eClimbableType m_ClimbableType = CLIMBABLE_TYPE_NOT; + eClimbableType m_ClimbableType = eClimbableType::CLIMBABLE_TYPE_NOT; }; #endif // SIMPLEPHYSICSCOMPONENT_H