From a2c7f93c52b63602d508ddf0275d5de0249b77f3 Mon Sep 17 00:00:00 2001 From: John Jones-Steele Date: Tue, 20 Jul 2021 11:43:40 +0100 Subject: [PATCH] Change the code so a temporary string isn't created Signed-off-by: John Jones-Steele --- .../Code/Include/ScriptEvents/ScriptEventDefinition.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gems/ScriptEvents/Code/Include/ScriptEvents/ScriptEventDefinition.h b/Gems/ScriptEvents/Code/Include/ScriptEvents/ScriptEventDefinition.h index 6d6a466b5d..07960a2e1a 100644 --- a/Gems/ScriptEvents/Code/Include/ScriptEvents/ScriptEventDefinition.h +++ b/Gems/ScriptEvents/Code/Include/ScriptEvents/ScriptEventDefinition.h @@ -151,7 +151,7 @@ namespace ScriptEvents const AZStd::vector& GetMethods() const { return m_methods; } - AZStd::string_view GetLabel() const { return GetName(); } + AZStd::string_view GetLabel() const { return m_name.Get()->c_str(); } void SetVersion(AZ::u32 version) { m_version = version; } ScriptEventData::VersionedProperty& GetNameProperty() { return m_name; }