Minor performance optimization to Prefab Instance.

Signed-off-by: AMZN-koppersr <82230785+AMZN-koppersr@users.noreply.github.com>
This commit is contained in:
AMZN-koppersr
2021-12-09 14:48:56 -08:00
parent 7e38a5f35c
commit cbea11c452
3 changed files with 7 additions and 6 deletions
@@ -142,14 +142,14 @@ namespace AzToolsFramework
return m_templateSourcePath;
}
void Instance::SetTemplateSourcePath(AZ::IO::PathView sourcePath)
void Instance::SetTemplateSourcePath(AZ::IO::Path sourcePath)
{
m_templateSourcePath = sourcePath;
m_templateSourcePath = AZStd::move(sourcePath);
}
void Instance::SetContainerEntityName(AZStd::string_view containerName)
void Instance::SetContainerEntityName(AZStd::string containerName)
{
m_containerEntity->SetName(containerName);
m_containerEntity->SetName(AZStd::move(containerName));
}
bool Instance::AddEntity(AZ::Entity& entity)
@@ -80,8 +80,8 @@ namespace AzToolsFramework
void SetTemplateId(TemplateId templateId);
const AZ::IO::Path& GetTemplateSourcePath() const;
void SetTemplateSourcePath(AZ::IO::PathView sourcePath);
void SetContainerEntityName(AZStd::string_view containerName);
void SetTemplateSourcePath(AZ::IO::Path sourcePath);
void SetContainerEntityName(AZStd::string containerName);
bool AddEntity(AZ::Entity& entity);
bool AddEntity(AZStd::unique_ptr<AZ::Entity>&& entity);
@@ -154,6 +154,7 @@ namespace AzToolsFramework::Prefab::PrefabConversionUtils
{
using namespace AzToolsFramework::Prefab;
// Resolve prefab links into spawnable links for the provided spawnable.
for (EntityAliasStore& entityAlias : m_entityAliases)
{
auto sourcePrefab = AZStd::get_if<EntityAliasPrefabLink>(&entityAlias.m_source);