diff --git a/Source/Engine/Level/Actor.cpp b/Source/Engine/Level/Actor.cpp index ff40cc208..7e2329389 100644 --- a/Source/Engine/Level/Actor.cpp +++ b/Source/Engine/Level/Actor.cpp @@ -1359,7 +1359,7 @@ bool Actor::IsPrefabRoot() const Actor* Actor::FindActor(const StringView& name) const { Actor* result = nullptr; - if (StringUtils::Compare(*_name, *name) == 0) + if (_name == name) { result = const_cast(this); } @@ -1393,7 +1393,7 @@ Actor* Actor::FindActor(const MClass* type) const Actor* Actor::FindActor(const MClass* type, const StringView& name) const { CHECK_RETURN(type, nullptr); - if (GetClass()->IsSubClassOf(type) && StringUtils::Compare(*_name, *name) == 0) + if (GetClass()->IsSubClassOf(type) && _name == name) return const_cast(this); for (auto child : Children) {