From b657ff8218ecee277c5b3c3865353f37ff03003b Mon Sep 17 00:00:00 2001 From: F-Mu <754431216@qq.com> Date: Fri, 2 Dec 2022 14:01:40 +0800 Subject: [PATCH] fix spelling mistake --- .../runtime/function/framework/object/object.cpp | 4 ++-- .../source/runtime/function/framework/object/object.h | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/engine/source/runtime/function/framework/object/object.cpp b/engine/source/runtime/function/framework/object/object.cpp index 5380fc76a..1bbfb34a8 100644 --- a/engine/source/runtime/function/framework/object/object.cpp +++ b/engine/source/runtime/function/framework/object/object.cpp @@ -49,11 +49,11 @@ namespace Piccolo } } - bool GObject::hasComponent(const std::string& compenent_type_name) const + bool GObject::hasComponent(const std::string& component_type_name) const { for (const auto& component : m_components) { - if (component.getTypeName() == compenent_type_name) + if (component.getTypeName() == component_type_name) return true; } diff --git a/engine/source/runtime/function/framework/object/object.h b/engine/source/runtime/function/framework/object/object.h index 6d7571918..e0ede0212 100644 --- a/engine/source/runtime/function/framework/object/object.h +++ b/engine/source/runtime/function/framework/object/object.h @@ -31,16 +31,16 @@ namespace Piccolo void setName(std::string name) { m_name = name; } const std::string& getName() const { return m_name; } - bool hasComponent(const std::string& compenent_type_name) const; + bool hasComponent(const std::string& component_type_name) const; std::vector> getComponents() { return m_components; } template - TComponent* tryGetComponent(const std::string& compenent_type_name) + TComponent* tryGetComponent(const std::string& component_type_name) { for (auto& component : m_components) { - if (component.getTypeName() == compenent_type_name) + if (component.getTypeName() == component_type_name) { return static_cast(component.operator->()); } @@ -50,11 +50,11 @@ namespace Piccolo } template - const TComponent* tryGetComponentConst(const std::string& compenent_type_name) const + const TComponent* tryGetComponentConst(const std::string& component_type_name) const { for (const auto& component : m_components) { - if (component.getTypeName() == compenent_type_name) + if (component.getTypeName() == component_type_name) { return static_cast(component.operator->()); }