Browse Source

[1688] editorial fixes/cleanups: folded long line, naming convention, constify.

also removed "addRRset" utility from rbnode_rrset_unittest, which seems to
be a leftover from an intermediate version (and isn't used anyway)
JINMEI Tatuya 13 years ago
parent
commit
c0f704fc09

+ 2 - 2
src/bin/auth/query.cc

@@ -59,9 +59,9 @@ Query::RRsetInserter::addRRset(isc::dns::Message& message,
                                const ConstRRsetPtr& rrset, const bool dnssec)
 {
     /// Is this RRset already in the list of RRsets added to the message?
-    std::vector<const AbstractRRset*>::iterator i =
+    const std::vector<const AbstractRRset*>::const_iterator i =
         std::find_if(added_.begin(), added_.end(),
-                     std::bind1st(Query::RRsetInserter::isSameKind(),
+                     std::bind1st(Query::RRsetInserter::IsSameKind(),
                                   rrset.get()));
     if (i == added_.end()) {
         // No - add it to both the message and the list of RRsets processed.

+ 1 - 1
src/bin/auth/query.h

@@ -265,7 +265,7 @@ private:
     class RRsetInserter {
     public:
         // \brief RRset comparison functor.
-        struct isSameKind : public std::binary_function<
+        struct IsSameKind : public std::binary_function<
                             const isc::dns::AbstractRRset*,
                             const isc::dns::AbstractRRset*,
                             bool> {

+ 2 - 1
src/bin/auth/tests/query_unittest.cc

@@ -2430,7 +2430,8 @@ loadRRsetVector() {
        << cname_nxdom_txt       // 7(1)
        << cname_out_txt;        // 8(1)
     rrset_vector.clear();
-    masterLoad(ss, Name("example.com."), RRClass::IN(), loadRRsetVectorCallback);
+    masterLoad(ss, Name("example.com."), RRClass::IN(),
+               loadRRsetVectorCallback);
 }
 
 TEST_F(QueryTest, DuplicateNameRemoval) {

+ 0 - 12
src/lib/datasrc/tests/rbnode_rrset_unittest.cc

@@ -157,18 +157,6 @@ TEST_F(RBNodeRRsetTest, isSameKind) {
     EXPECT_FALSE(rrset_p.isSameKind(rrset_z));
 }
 
-
-// Utility function to create an add an RRset to a vector of RRsets for the
-// "less" test.  It's only purpose is to allow the RRset creation to be
-// written with arguments in an order that reflects the RRset ordering.
-void
-addRRset(std::vector<ConstRRsetPtr>& vec, const RRType& rrtype,
-            const RRClass& rrclass, const char* rrname)
-{
-    vec.push_back(ConstRRsetPtr(new RRset(Name(rrname), rrclass, rrtype,
-                                          RRTTL(3600))));
-}
-
 // Note: although the next two tests are essentially the same and used common
 // test code, they use different test data: the MessageRenderer produces
 // compressed wire data whereas the OutputBuffer does not.