diff --git a/Gems/Atom/RPI/Code/Include/Atom/RPI.Edit/Material/MaterialTypeSourceData.h b/Gems/Atom/RPI/Code/Include/Atom/RPI.Edit/Material/MaterialTypeSourceData.h index 6c439195f1..35cc7fe09a 100644 --- a/Gems/Atom/RPI/Code/Include/Atom/RPI.Edit/Material/MaterialTypeSourceData.h +++ b/Gems/Atom/RPI/Code/Include/Atom/RPI.Edit/Material/MaterialTypeSourceData.h @@ -308,11 +308,11 @@ namespace AZ private: - const PropertySet* FindPropertySet(AZStd::array_view parsedPropertySetId, AZStd::array_view> inPropertySetList) const; - PropertySet* FindPropertySet(AZStd::array_view parsedPropertySetId, AZStd::array_view> inPropertySetList); + const PropertySet* FindPropertySet(AZStd::span parsedPropertySetId, AZStd::span> inPropertySetList) const; + PropertySet* FindPropertySet(AZStd::span parsedPropertySetId, AZStd::span> inPropertySetList); - const PropertyDefinition* FindProperty(AZStd::array_view parsedPropertyId, AZStd::array_view> inPropertySetList) const; - PropertyDefinition* FindProperty(AZStd::array_view parsedPropertyId, AZStd::array_view> inPropertySetList); + const PropertyDefinition* FindProperty(AZStd::span parsedPropertyId, AZStd::span> inPropertySetList) const; + PropertyDefinition* FindProperty(AZStd::span parsedPropertyId, AZStd::span> inPropertySetList); // Function overloads for recursion, returns false to indicate that recursion should end. bool EnumeratePropertySets(const EnumeratePropertySetsCallback& callback, AZStd::string propertyIdContext, const AZStd::vector>& inPropertySetList) const; diff --git a/Gems/Atom/RPI/Code/Source/RPI.Edit/Material/MaterialPropertyId.cpp b/Gems/Atom/RPI/Code/Source/RPI.Edit/Material/MaterialPropertyId.cpp index 1a9b91f431..1f5581e417 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Edit/Material/MaterialPropertyId.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Edit/Material/MaterialPropertyId.cpp @@ -88,7 +88,7 @@ namespace AZ { } - MaterialPropertyId::MaterialPropertyId(const AZStd::array_view groupNames, AZStd::string_view propertyName) + MaterialPropertyId::MaterialPropertyId(const AZStd::span groupNames, AZStd::string_view propertyName) { for (const auto& name : groupNames) { @@ -118,7 +118,7 @@ namespace AZ } } - MaterialPropertyId::MaterialPropertyId(const AZStd::array_view names) + MaterialPropertyId::MaterialPropertyId(const AZStd::span names) { for (const auto& name : names) { diff --git a/Gems/Atom/RPI/Code/Source/RPI.Edit/Material/MaterialTypeSourceData.cpp b/Gems/Atom/RPI/Code/Source/RPI.Edit/Material/MaterialTypeSourceData.cpp index 032d36636e..4aa0a77370 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Edit/Material/MaterialTypeSourceData.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Edit/Material/MaterialTypeSourceData.cpp @@ -247,7 +247,7 @@ namespace AZ return parentPropertySet->AddProperty(splitPropertyId[1]); } - const MaterialTypeSourceData::PropertySet* MaterialTypeSourceData::FindPropertySet(AZStd::array_view parsedPropertySetId, AZStd::array_view> inPropertySetList) const + const MaterialTypeSourceData::PropertySet* MaterialTypeSourceData::FindPropertySet(AZStd::span parsedPropertySetId, AZStd::span> inPropertySetList) const { for (const auto& propertySet : inPropertySetList) { @@ -261,7 +261,7 @@ namespace AZ } else { - AZStd::array_view subPath{parsedPropertySetId.begin() + 1, parsedPropertySetId.end()}; + AZStd::span subPath{parsedPropertySetId.begin() + 1, parsedPropertySetId.end()}; if (!subPath.empty()) { @@ -277,7 +277,7 @@ namespace AZ return nullptr; } - MaterialTypeSourceData::PropertySet* MaterialTypeSourceData::FindPropertySet(AZStd::array_view parsedPropertySetId, AZStd::array_view> inPropertySetList) + MaterialTypeSourceData::PropertySet* MaterialTypeSourceData::FindPropertySet(AZStd::span parsedPropertySetId, AZStd::span> inPropertySetList) { return const_cast(const_cast(this)->FindPropertySet(parsedPropertySetId, inPropertySetList)); } @@ -295,14 +295,14 @@ namespace AZ } const MaterialTypeSourceData::PropertyDefinition* MaterialTypeSourceData::FindProperty( - AZStd::array_view parsedPropertyId, - AZStd::array_view> inPropertySetList) const + AZStd::span parsedPropertyId, + AZStd::span> inPropertySetList) const { for (const auto& propertySet : inPropertySetList) { if (propertySet->m_name == parsedPropertyId[0]) { - AZStd::array_view subPath {parsedPropertyId.begin() + 1, parsedPropertyId.end()}; + AZStd::span subPath {parsedPropertyId.begin() + 1, parsedPropertyId.end()}; if (subPath.size() == 1) { @@ -328,7 +328,7 @@ namespace AZ return nullptr; } - MaterialTypeSourceData::PropertyDefinition* MaterialTypeSourceData::FindProperty(AZStd::array_view parsedPropertyId, AZStd::array_view> inPropertySetList) + MaterialTypeSourceData::PropertyDefinition* MaterialTypeSourceData::FindProperty(AZStd::span parsedPropertyId, AZStd::span> inPropertySetList) { return const_cast(const_cast(this)->FindProperty(parsedPropertyId, inPropertySetList)); }