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->()); }