From a0dcda97101ae4b1f523a7595a2ec8172955ca87 Mon Sep 17 00:00:00 2001 From: Jonathan Stone Date: Tue, 15 Oct 2024 14:24:32 -0700 Subject: [PATCH] Fix const correctness --- source/MaterialXCore/Element.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/MaterialXCore/Element.cpp b/source/MaterialXCore/Element.cpp index 2627be60a1..af47a6a2ba 100644 --- a/source/MaterialXCore/Element.cpp +++ b/source/MaterialXCore/Element.cpp @@ -287,7 +287,7 @@ ElementPtr Element::changeChildCategory(ElementPtr child, const string& category template shared_ptr Element::getChildOfType(const string& name) const { ElementPtr child; - DocumentPtr doc = asA(); + ConstDocumentPtr doc = asA(); if (doc && doc->hasDataLibrary()) { child = doc->getDataLibrary()->getChild(name); @@ -302,7 +302,7 @@ template shared_ptr Element::getChildOfType(const string& name) con template vector> Element::getChildrenOfType(const string& category) const { vector> children; - DocumentPtr doc = asA(); + ConstDocumentPtr doc = asA(); if (doc && doc->hasDataLibrary()) { children = doc->getDataLibrary()->getChildrenOfType(category);