From e149abe550ab34623703b1877fb8fa69c6188309 Mon Sep 17 00:00:00 2001 From: Nicholas Van Sickle Date: Tue, 15 Feb 2022 14:42:52 -0800 Subject: [PATCH] Tidy a bit of API Signed-off-by: Nicholas Van Sickle --- Code/Framework/AzCore/AzCore/DOM/DomPrefixTree.h | 7 ++++++- Code/Framework/AzCore/AzCore/DOM/DomPrefixTree.inl | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) 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)