BIND 10 trac2750, updated. a0aaef8644a889594af32cd5a3898a63a225b7cb [2750] Reduce the number of find() wrappers

BIND 10 source code commits bind10-changes at lists.isc.org
Wed Sep 18 11:37:49 UTC 2013


The branch, trac2750 has been updated
       via  a0aaef8644a889594af32cd5a3898a63a225b7cb (commit)
      from  bd9f2d3c9e45d945b8e6ad9db79f93954ee0dcf9 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit a0aaef8644a889594af32cd5a3898a63a225b7cb
Author: Mukund Sivaraman <muks at isc.org>
Date:   Wed Sep 18 15:52:55 2013 +0530

    [2750] Reduce the number of find() wrappers

-----------------------------------------------------------------------

Summary of changes:
 src/lib/datasrc/memory/domaintree.h |   48 ++++++++---------------------------
 1 file changed, 10 insertions(+), 38 deletions(-)

-----------------------------------------------------------------------
diff --git a/src/lib/datasrc/memory/domaintree.h b/src/lib/datasrc/memory/domaintree.h
index 727f54a..51127cb 100644
--- a/src/lib/datasrc/memory/domaintree.h
+++ b/src/lib/datasrc/memory/domaintree.h
@@ -1340,17 +1340,6 @@ private:
 
     /// \brief Static helper function used by const and non-const
     /// variants of find() below
-    template <typename TT, typename TTN>
-    static Result findImpl(TT* tree, const isc::dns::Name& name, TTN** node);
-
-    /// \brief Static helper function used by const and non-const
-    /// variants of find() below
-    template <typename TT, typename TTN>
-    static Result findImpl(TT* tree, const isc::dns::Name& name,
-                           TTN** node, DomainTreeNodeChain<T>& node_path);
-
-    /// \brief Static helper function used by const and non-const
-    /// variants of find() below
     template <typename TT, typename TTN, typename CBARG>
     static Result findImpl(TT* tree, const isc::dns::Name& name,
                            TTN** node, DomainTreeNodeChain<T>& node_path,
@@ -1452,15 +1441,17 @@ public:
     /// Acts as described in the \ref find section.
     Result find(const isc::dns::Name& name,
                 DomainTreeNode<T>** node) {
-        return (findImpl<DomainTree<T>, DomainTreeNode<T> >
-                (this, name, node));
+        DomainTreeNodeChain<T> node_path;
+        return (findImpl<DomainTree<T>, DomainTreeNode<T>, void* >
+                (this, name, node, node_path, NULL, NULL));
     }
 
     /// \brief Simple find (const variant)
     Result find(const isc::dns::Name& name,
                 const DomainTreeNode<T>** node) const {
-        return (findImpl<const DomainTree<T>, const DomainTreeNode<T> >
-                (this, name, node));
+        DomainTreeNodeChain<T> node_path;
+        return (findImpl<const DomainTree<T>, const DomainTreeNode<T>, void* >
+                (this, name, node, node_path, NULL, NULL));
     }
 
     /// \brief Simple find, with node_path tracking
@@ -1469,16 +1460,16 @@ public:
     Result find(const isc::dns::Name& name, DomainTreeNode<T>** node,
                 DomainTreeNodeChain<T>& node_path)
     {
-        return (findImpl<DomainTree<T>, DomainTreeNode<T> >
-                (this, name, node, node_path));
+        return (findImpl<DomainTree<T>, DomainTreeNode<T>, void* >
+                (this, name, node, node_path, NULL, NULL));
     }
 
     /// \brief Simple find, with node_path tracking (const variant)
     Result find(const isc::dns::Name& name, const DomainTreeNode<T>** node,
                 DomainTreeNodeChain<T>& node_path) const
     {
-        return (findImpl<const DomainTree<T>, const DomainTreeNode<T> >
-                (this, name, node, node_path));
+        return (findImpl<const DomainTree<T>, const DomainTreeNode<T>, void* >
+                (this, name, node, node_path, NULL, NULL));
     }
 
     /// \brief Simple find with callback
@@ -1839,25 +1830,6 @@ DomainTree<T>::deleteHelper(util::MemorySegment& mem_sgmt,
 }
 
 template <typename T>
-template <typename TT, typename TTN>
-typename DomainTree<T>::Result
-DomainTree<T>::findImpl(TT* tree, const isc::dns::Name& name, TTN** node)
-{
-    DomainTreeNodeChain<T> node_path;
-    return (tree->find<void*>(name, node, node_path, NULL, NULL));
-}
-
-template <typename T>
-template <typename TT, typename TTN>
-typename DomainTree<T>::Result
-DomainTree<T>::findImpl(TT* tree, const isc::dns::Name& name,
-                        TTN** node, DomainTreeNodeChain<T>& node_path)
-{
-    const isc::dns::LabelSequence ls(name);
-    return (tree->find<void*>(ls, node, node_path, NULL, NULL));
-}
-
-template <typename T>
 template <typename TT, typename TTN, typename CBARG>
 typename DomainTree<T>::Result
 DomainTree<T>::findImpl(TT* tree, const isc::dns::Name& name,



More information about the bind10-changes mailing list