BIND 10 trac1608, updated. bf8e9e937a158253853013a6f316573d3b53e3ee [1608] additonal cleanup: use ref instead of shptr, make helper static method.

BIND 10 source code commits bind10-changes at lists.isc.org
Sat Mar 10 22:58:29 UTC 2012


The branch, trac1608 has been updated
       via  bf8e9e937a158253853013a6f316573d3b53e3ee (commit)
      from  a2d27b3d05763fa267d6f19cff7468ac86063a38 (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 bf8e9e937a158253853013a6f316573d3b53e3ee
Author: JINMEI Tatuya <jinmei at isc.org>
Date:   Sat Mar 10 14:57:47 2012 -0800

    [1608] additonal cleanup: use ref instead of shptr, make helper static method.

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

Summary of changes:
 src/lib/datasrc/memory_datasrc.cc |   28 ++++++++++++++--------------
 1 files changed, 14 insertions(+), 14 deletions(-)

-----------------------------------------------------------------------
diff --git a/src/lib/datasrc/memory_datasrc.cc b/src/lib/datasrc/memory_datasrc.cc
index 954f562..03b6eaf 100644
--- a/src/lib/datasrc/memory_datasrc.cc
+++ b/src/lib/datasrc/memory_datasrc.cc
@@ -325,27 +325,27 @@ public:
         ZoneFinder::Context(finder, options,
                             ResultContext(result.code, result.rrset,
                                           result.flags)),
-        rrset(result.rrset), found_node(result.found_node)
+        rrset_(result.rrset), found_node_(result.found_node)
     {}
 
 protected:
     virtual void getAdditionalImpl(const vector<RRType>& requested_types,
                                    vector<ConstRRsetPtr>& result)
     {
-        if (!rrset) {
+        if (!rrset_) {
             // In this case this context should encapsulate the result of
-            // findAll() and found_node should point to a valid answer node.
-            if (found_node == NULL || found_node->isEmpty()) {
+            // findAll() and found_node_ should point to a valid answer node.
+            if (found_node_ == NULL || found_node_->isEmpty()) {
                 isc_throw(isc::Unexpected,
                           "Invalid call to in-memory getAdditional: caller's "
                           "bug or broken zone");
             }
-            BOOST_FOREACH(const DomainPair& dom_it, *found_node->getData()) {
-                getAdditionalForRRset(dom_it.second, requested_types,
+            BOOST_FOREACH(const DomainPair& dom_it, *found_node_->getData()) {
+                getAdditionalForRRset(*dom_it.second, requested_types,
                                       result);
             }
         } else {
-            getAdditionalForRRset(rrset, requested_types, result);
+            getAdditionalForRRset(*rrset_, requested_types, result);
         }
     }
 
@@ -354,16 +354,16 @@ private:
     // The process is straightforward: it examines the link to
     // AdditionalNodeInfo vector (if set), and find RRsets of the requested
     // type for each node.
-    void getAdditionalForRRset(ConstRBNodeRRsetPtr rrset,
-                               const vector<RRType>& requested_types,
-                               vector<ConstRRsetPtr>& result) const
+    static void getAdditionalForRRset(const RBNodeRRset& rrset,
+                                      const vector<RRType>& requested_types,
+                                      vector<ConstRRsetPtr>& result)
     {
         const vector<AdditionalNodeInfo>* additionals_ =
-            rrset->getAdditionalNodes();
+            rrset.getAdditionalNodes();
         if (additionals_ == NULL) {
             return;
         }
-        const bool glue_ok = (rrset->getType() == RRType::NS());
+        const bool glue_ok = (rrset.getType() == RRType::NS());
         BOOST_FOREACH(const AdditionalNodeInfo& additional, *additionals_) {
             assert(additional.node_ != NULL);
             if (additional.node_->isEmpty()) {
@@ -383,8 +383,8 @@ private:
         }
     }
 
-    const ConstRBNodeRRsetPtr rrset;
-    const DomainNode* const found_node;
+    const ConstRBNodeRRsetPtr rrset_;
+    const DomainNode* const found_node_;
 };
 
 // Private data and hidden methods of InMemoryZoneFinder



More information about the bind10-changes mailing list