diff --git a/Code/Framework/AzCore/AzCore/DOM/DomPrefixTree.h b/Code/Framework/AzCore/AzCore/DOM/DomPrefixTree.h index eb5d41f352..1322dbf843 100644 --- a/Code/Framework/AzCore/AzCore/DOM/DomPrefixTree.h +++ b/Code/Framework/AzCore/AzCore/DOM/DomPrefixTree.h @@ -43,8 +43,13 @@ namespace AZ::Dom DomPrefixTree(DomPrefixTree&&) = default; explicit DomPrefixTree(AZStd::initializer_list> init); + DomPrefixTree& operator=(const DomPrefixTree&) = default; + DomPrefixTree& operator=(DomPrefixTree&&) = default; + + using VisitorFunction = AZStd::function; + //! Visits a path and calls a visitor for each matching path and value. - void VisitPath(const Path& path, PrefixTreeMatch match, const AZStd::function& visitor) const; + void VisitPath(const Path& path, PrefixTreeMatch match, const VisitorFunction& visitor) const; //! Visits a path and returns the most specific matching value, or null if none was found. T* ValueAtPath(const Path& path, PrefixTreeMatch match); //! \see ValueAtPath diff --git a/Code/Framework/AzCore/AzCore/DOM/DomPrefixTree.inl b/Code/Framework/AzCore/AzCore/DOM/DomPrefixTree.inl index 41c0a02687..be129aa3e0 100644 --- a/Code/Framework/AzCore/AzCore/DOM/DomPrefixTree.inl +++ b/Code/Framework/AzCore/AzCore/DOM/DomPrefixTree.inl @@ -52,7 +52,7 @@ namespace AZ::Dom } template - void DomPrefixTree::VisitPath(const Path& path, PrefixTreeMatch match, const AZStd::function& visitor) const + void DomPrefixTree::VisitPath(const Path& path, PrefixTreeMatch match, const VisitorFunction& visitor) const { const Node* rootNode = GetNodeForPath(path); if (rootNode == nullptr)