From d9fe89ba56a1c7d344538951909f086386ba5947 Mon Sep 17 00:00:00 2001 From: mbalfour Date: Tue, 20 Apr 2021 13:37:10 -0500 Subject: [PATCH] Addressed feedback - made string& into a string_view. --- Code/Framework/AzCore/AzCore/Component/ComponentApplication.cpp | 2 +- Code/Framework/AzCore/AzCore/Component/ComponentApplication.h | 2 +- .../Framework/AzCore/AzCore/Component/ComponentApplicationBus.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Code/Framework/AzCore/AzCore/Component/ComponentApplication.cpp b/Code/Framework/AzCore/AzCore/Component/ComponentApplication.cpp index a3986f72dd..c55f565615 100644 --- a/Code/Framework/AzCore/AzCore/Component/ComponentApplication.cpp +++ b/Code/Framework/AzCore/AzCore/Component/ComponentApplication.cpp @@ -1063,7 +1063,7 @@ namespace AZ //========================================================================= // SetEntityName //========================================================================= - bool ComponentApplication::SetEntityName(const EntityId& id, const AZStd::string& name) + bool ComponentApplication::SetEntityName(const EntityId& id, const AZStd::string_view name) { Entity* entity = FindEntity(id); if (entity) diff --git a/Code/Framework/AzCore/AzCore/Component/ComponentApplication.h b/Code/Framework/AzCore/AzCore/Component/ComponentApplication.h index a66409eaf3..3ebcf39d95 100644 --- a/Code/Framework/AzCore/AzCore/Component/ComponentApplication.h +++ b/Code/Framework/AzCore/AzCore/Component/ComponentApplication.h @@ -209,7 +209,7 @@ namespace AZ bool DeleteEntity(const EntityId& id) override; Entity* FindEntity(const EntityId& id) override; AZStd::string GetEntityName(const EntityId& id) override; - bool SetEntityName(const EntityId& id, const AZStd::string& name) override; + bool SetEntityName(const EntityId& id, const AZStd::string_view name) override; void EnumerateEntities(const ComponentApplicationRequests::EntityCallback& callback) override; ComponentApplication* GetApplication() override { return this; } /// Returns the serialize context that has been registered with the app, if there is one. diff --git a/Code/Framework/AzCore/AzCore/Component/ComponentApplicationBus.h b/Code/Framework/AzCore/AzCore/Component/ComponentApplicationBus.h index a3602c303e..3582e6ebb8 100644 --- a/Code/Framework/AzCore/AzCore/Component/ComponentApplicationBus.h +++ b/Code/Framework/AzCore/AzCore/Component/ComponentApplicationBus.h @@ -136,7 +136,7 @@ namespace AZ //! Entity names are not enforced to be unique. //! @param entityId A reference to the entity whose name you want to change. //! @return True if the name was changed successfully, false if it wasn't. - virtual bool SetEntityName([[maybe_unused]] const EntityId& id, [[maybe_unused]] const AZStd::string& name) { return false; } + virtual bool SetEntityName([[maybe_unused]] const EntityId& id, [[maybe_unused]] const AZStd::string_view name) { return false; } //! The type that AZ::ComponentApplicationRequests::EnumerateEntities uses to //! pass entity callbacks to the application for enumeration.