Skip to content

Commit

Permalink
Fix const correctness
Browse files Browse the repository at this point in the history
  • Loading branch information
jstone-lucasfilm authored Oct 15, 2024
1 parent 1c4af95 commit a0dcda9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions source/MaterialXCore/Element.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ ElementPtr Element::changeChildCategory(ElementPtr child, const string& category
template <class T> shared_ptr<T> Element::getChildOfType(const string& name) const
{
ElementPtr child;
DocumentPtr doc = asA<Document>();
ConstDocumentPtr doc = asA<Document>();
if (doc && doc->hasDataLibrary())
{
child = doc->getDataLibrary()->getChild(name);
Expand All @@ -302,7 +302,7 @@ template <class T> shared_ptr<T> Element::getChildOfType(const string& name) con
template <class T> vector<shared_ptr<T>> Element::getChildrenOfType(const string& category) const
{
vector<shared_ptr<T>> children;
DocumentPtr doc = asA<Document>();
ConstDocumentPtr doc = asA<Document>();
if (doc && doc->hasDataLibrary())
{
children = doc->getDataLibrary()->getChildrenOfType<T>(category);
Expand Down

0 comments on commit a0dcda9

Please sign in to comment.