diff --git a/pxr/usd/usd/schemaRegistry.cpp b/pxr/usd/usd/schemaRegistry.cpp index 9ee1af195c..39ca9ce959 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 @@ -1455,7 +1455,8 @@ BuildPrimDefinition(_SchemaDefInitHelper *defInitHelper) // With all the built-in API schemas composed in, we can now compose any // API schema property overrides declared in this API schema over the // defined properties. - for (const TfToken &overridePropertyName : overridePropertyNames) { + for (const TfToken &overridePropertyName : + overridePropertyNames.AsConst()) { primDef->_ComposeOverAndReplaceExistingProperty( overridePropertyName, schematicsLayer, @@ -1535,7 +1536,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. @@ -1565,7 +1566,8 @@ _PopulateConcretePrimDefinitions() const // With all the built-in API schemas applied, we can now compose any // API schema property overrides declared in the typed schema over the // current defined properties. - for (const TfToken &overridePropertyName : overridePropertyNames) { + for (const TfToken &overridePropertyName : + overridePropertyNames.AsConst()) { primDef->_ComposeOverAndReplaceExistingProperty( overridePropertyName, schematicsLayer,