BIND 10 trac1688, updated. 953d4bcf1e60b63785216f523ce5cd9929ced8e7 [1688] (unrelated cleanup) make RESERVE_RRSETS a private member of Query class.

BIND 10 source code commits bind10-changes at lists.isc.org
Thu Mar 22 17:15:21 UTC 2012


The branch, trac1688 has been updated
       via  953d4bcf1e60b63785216f523ce5cd9929ced8e7 (commit)
       via  50795e21557b68a31f0c497f6de311d428b5d88a (commit)
       via  46f937392ece1d17476f44ca7d06869c28a3da72 (commit)
       via  3dae42840853b9ff8b4e580c794a29e8e2f30030 (commit)
       via  7713b147008a03d871a30d3072bdc1085f11b942 (commit)
      from  6f8e187c1bc8671be1e6da370f192d58eda3995c (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 953d4bcf1e60b63785216f523ce5cd9929ced8e7
Author: JINMEI Tatuya <jinmei at isc.org>
Date:   Thu Mar 22 10:13:04 2012 -0700

    [1688] (unrelated cleanup) make RESERVE_RRSETS a private member of Query class.
    
    This will prevent it from causing definition bloat even if the linkder
    doesn't combine the constant def.  It would also make more sense to make
    it inaccessible from others anyway, because it's basically an
    implementation-internal constatnt.

commit 50795e21557b68a31f0c497f6de311d428b5d88a
Author: JINMEI Tatuya <jinmei at isc.org>
Date:   Thu Mar 22 10:11:05 2012 -0700

    [1688] use referene, rather than making a local copy, for a const vector.

commit 46f937392ece1d17476f44ca7d06869c28a3da72
Author: JINMEI Tatuya <jinmei at isc.org>
Date:   Thu Mar 22 10:10:24 2012 -0700

    [1688] removed a redundant newline

commit 3dae42840853b9ff8b4e580c794a29e8e2f30030
Author: JINMEI Tatuya <jinmei at isc.org>
Date:   Thu Mar 22 10:08:05 2012 -0700

    [1688] use sstream, not iostreaam, for ostringstream.  also reordered headers.

commit 7713b147008a03d871a30d3072bdc1085f11b942
Author: JINMEI Tatuya <jinmei at isc.org>
Date:   Thu Mar 22 10:03:49 2012 -0700

    [1688] removed an (now) unused header file.  also reordered headers.

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

Summary of changes:
 src/bin/auth/query.cc                          |    2 +-
 src/bin/auth/query.h                           |   15 +++++++--------
 src/lib/datasrc/rbnode_rrset.h                 |    1 -
 src/lib/datasrc/tests/rbnode_rrset_unittest.cc |    9 ++++-----
 src/lib/dns/tests/rrset_unittest.cc            |    8 ++++----
 5 files changed, 16 insertions(+), 19 deletions(-)

-----------------------------------------------------------------------
diff --git a/src/bin/auth/query.cc b/src/bin/auth/query.cc
index 6b8be0f..793a64f 100644
--- a/src/bin/auth/query.cc
+++ b/src/bin/auth/query.cc
@@ -77,7 +77,7 @@ void
 Query::ResponseCreator::create(Message& response,
                                const vector<ConstRRsetPtr>& answers,
                                const vector<ConstRRsetPtr>& authorities,
-                               const vector<ConstRRsetPtr> additionals,
+                               const vector<ConstRRsetPtr>& additionals,
                                const bool dnssec)
 {
     // Inserter should be reset each time the query is reset, so should be
diff --git a/src/bin/auth/query.h b/src/bin/auth/query.h
index 5ce9ad3..dce19f7 100644
--- a/src/bin/auth/query.h
+++ b/src/bin/auth/query.h
@@ -37,13 +37,6 @@ class DataSourceClient;
 
 namespace auth {
 
-/// \brief Initial reserved size for the vectors in Query
-///
-/// The value is larger than we expect the vectors to even become, and
-/// has been chosen arbitrarily. The reason to set them quite high is
-/// to prevent reallocation on addition.
-const size_t RESERVE_RRSETS = 64;
-
 /// The \c Query class represents a standard DNS query that encapsulates
 /// processing logic to answer the query.
 ///
@@ -76,6 +69,12 @@ const size_t RESERVE_RRSETS = 64;
 /// we keep this name at the moment.
 class Query : boost::noncopyable {
 private:
+    /// \brief Initial reserved size for the vectors in Query
+    ///
+    /// The value is larger than we expect the vectors to even become, and
+    /// has been chosen arbitrarily. The reason to set them quite high is
+    /// to prevent reallocation on addition.
+    static const size_t RESERVE_RRSETS = 64;
 
     /// \brief Adds a SOA.
     ///
@@ -452,7 +451,7 @@ public:
             isc::dns::Message& message,
             const std::vector<isc::dns::ConstRRsetPtr>& answers_,
             const std::vector<isc::dns::ConstRRsetPtr>& authorities_,
-            const std::vector<isc::dns::ConstRRsetPtr> additionals_,
+            const std::vector<isc::dns::ConstRRsetPtr>& additionals_,
             const bool dnssec);
 
     private:
diff --git a/src/lib/datasrc/rbnode_rrset.h b/src/lib/datasrc/rbnode_rrset.h
index d711f71..3e5d20a 100644
--- a/src/lib/datasrc/rbnode_rrset.h
+++ b/src/lib/datasrc/rbnode_rrset.h
@@ -141,7 +141,6 @@ public:
         }
     }
 
-
     virtual unsigned int toWire(
         isc::dns::AbstractMessageRenderer& renderer) const;
 
diff --git a/src/lib/datasrc/tests/rbnode_rrset_unittest.cc b/src/lib/datasrc/tests/rbnode_rrset_unittest.cc
index 0fb82bc..57e8dbd 100644
--- a/src/lib/datasrc/tests/rbnode_rrset_unittest.cc
+++ b/src/lib/datasrc/tests/rbnode_rrset_unittest.cc
@@ -12,18 +12,17 @@
 // OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 // PERFORMANCE OF THIS SOFTWARE.
 
-#include <algorithm>
-#include <sstream>
-#include <stdexcept>
-
 #include <exceptions/exceptions.h>
 #include <dns/rdataclass.h>
 #include <datasrc/rbnode_rrset.h>
 #include <testutils/dnsmessage_test.h>
 
+#include <dns/tests/unittest_util.h>
+
 #include <gtest/gtest.h>
 
-#include <dns/tests/unittest_util.h>
+#include <sstream>
+#include <stdexcept>
 
 using isc::UnitTestUtil;
 
diff --git a/src/lib/dns/tests/rrset_unittest.cc b/src/lib/dns/tests/rrset_unittest.cc
index a0ea532..1603293 100644
--- a/src/lib/dns/tests/rrset_unittest.cc
+++ b/src/lib/dns/tests/rrset_unittest.cc
@@ -12,9 +12,6 @@
 // OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 // PERFORMANCE OF THIS SOFTWARE.
 
-#include <stdexcept>
-#include <iostream>
-
 #include <util/buffer.h>
 #include <dns/messagerenderer.h>
 #include <dns/name.h>
@@ -25,9 +22,12 @@
 #include <dns/rrttl.h>
 #include <dns/rrset.h>
 
+#include <dns/tests/unittest_util.h>
+
 #include <gtest/gtest.h>
 
-#include <dns/tests/unittest_util.h>
+#include <stdexcept>
+#include <sstream>
 
 using isc::UnitTestUtil;
 



More information about the bind10-changes mailing list