Tidy a bit of API

Signed-off-by: Nicholas Van Sickle <nvsickle@amazon.com>
monroegm-disable-blank-issue-2
Nicholas Van Sickle 4 years ago
parent 5543a0d32d
commit e149abe550

@ -43,8 +43,13 @@ namespace AZ::Dom
DomPrefixTree(DomPrefixTree&&) = default; DomPrefixTree(DomPrefixTree&&) = default;
explicit DomPrefixTree(AZStd::initializer_list<AZStd::pair<Path, T>> init); explicit DomPrefixTree(AZStd::initializer_list<AZStd::pair<Path, T>> init);
DomPrefixTree& operator=(const DomPrefixTree&) = default;
DomPrefixTree& operator=(DomPrefixTree&&) = default;
using VisitorFunction = AZStd::function<void(const Path&, const T&)>;
//! Visits a path and calls a visitor for each matching path and value. //! Visits a path and calls a visitor for each matching path and value.
void VisitPath(const Path& path, PrefixTreeMatch match, const AZStd::function<void(const Path&, const T&)>& 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. //! Visits a path and returns the most specific matching value, or null if none was found.
T* ValueAtPath(const Path& path, PrefixTreeMatch match); T* ValueAtPath(const Path& path, PrefixTreeMatch match);
//! \see ValueAtPath //! \see ValueAtPath

@ -52,7 +52,7 @@ namespace AZ::Dom
} }
template<class T> template<class T>
void DomPrefixTree<T>::VisitPath(const Path& path, PrefixTreeMatch match, const AZStd::function<void(const Path&, const T&)>& visitor) const void DomPrefixTree<T>::VisitPath(const Path& path, PrefixTreeMatch match, const VisitorFunction& visitor) const
{ {
const Node* rootNode = GetNodeForPath(path); const Node* rootNode = GetNodeForPath(path);
if (rootNode == nullptr) if (rootNode == nullptr)

Loading…
Cancel
Save