]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[1688] editorial fixes/cleanups: folded long line, naming convention, constify.
authorJINMEI Tatuya <jinmei@isc.org>
Wed, 21 Mar 2012 20:58:50 +0000 (13:58 -0700)
committerJINMEI Tatuya <jinmei@isc.org>
Wed, 21 Mar 2012 20:58:50 +0000 (13:58 -0700)
also removed "addRRset" utility from rbnode_rrset_unittest, which seems to
be a leftover from an intermediate version (and isn't used anyway)

src/bin/auth/query.cc
src/bin/auth/query.h
src/bin/auth/tests/query_unittest.cc
src/lib/datasrc/tests/rbnode_rrset_unittest.cc

index a6a666256d290aed296b306ea7a6606ebf3e1529..5a99b400cd78e7bebcb2adbaf2686d6a0f73a701 100644 (file)
@@ -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.
index 44092d0832ec53630ad91437f4cec2bd8fbba1d8..4b68181f2823758b9f16feefe1c072c09a0db83a 100644 (file)
@@ -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> {
index e40854337dd079fc74da282cebd39bd606c5433e..53edcf27c8f3a81e6eb207c08bb1c08120d51770 100644 (file)
@@ -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) {
index d6fa32e049a28ec19686f8236eb572bf3cfa8ff3..0fb82bcdb1ca3159b21445585f9dde534b6e367a 100644 (file)
@@ -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.