From b4abb874998a940ff722fb75c51bd7f7b8195a90 Mon Sep 17 00:00:00 2001 From: Matt Kuruc Date: Wed, 15 Nov 2023 13:34:51 -0800 Subject: [PATCH] Guard against unnecessary array detaches in attribute creation --- pxr/usd/usd/schemaRegistry.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pxr/usd/usd/schemaRegistry.cpp b/pxr/usd/usd/schemaRegistry.cpp index 9ee1af195c..e712824595 100644 --- a/pxr/usd/usd/schemaRegistry.cpp +++ b/pxr/usd/usd/schemaRegistry.cpp @@ -1330,7 +1330,7 @@ BuildPrimDefinition(_SchemaDefInitHelper *defInitHelper) // Get the list of names of any override properties this schema may have as // we want to skip these at first when initializing the prim definition. - VtTokenArray overridePropertyNames = _GetOverridePropertyNames( + const VtTokenArray overridePropertyNames = _GetOverridePropertyNames( schematicsLayer, schematicsPrimPath); // Multiple apply schemas are actually templates for creating an instance of @@ -1535,7 +1535,7 @@ _PopulateConcretePrimDefinitions() const const SdfPath schematicsPrimPath = SdfPath::AbsoluteRootPath().AppendChild(schemaInfo->identifier); - VtTokenArray overridePropertyNames = _GetOverridePropertyNames( + const VtTokenArray overridePropertyNames = _GetOverridePropertyNames( schematicsLayer, schematicsPrimPath); // Create and initialize a new prim definition for the concrete schema.