BIND 10 trac1924, updated. e931cdc9d86861eb9ca96a4bdd3bdf407f2e897f [1924] prioritize a method where possible.

BIND 10 source code commits bind10-changes at lists.isc.org
Thu Feb 7 20:25:03 UTC 2013


The branch, trac1924 has been updated
       via  e931cdc9d86861eb9ca96a4bdd3bdf407f2e897f (commit)
       via  2c51eb144dfdf9a63a982df1e8a20bc3665d82a1 (commit)
      from  b13d755de9ad00a27e63d863ac977aa6a18fb8c7 (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 e931cdc9d86861eb9ca96a4bdd3bdf407f2e897f
Author: JINMEI Tatuya <jinmei at isc.org>
Date:   Thu Feb 7 12:24:52 2013 -0800

    [1924] prioritize a method where possible.

commit 2c51eb144dfdf9a63a982df1e8a20bc3665d82a1
Author: JINMEI Tatuya <jinmei at isc.org>
Date:   Thu Feb 7 12:18:49 2013 -0800

    [1924] constify, adjusted position of '&'

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

Summary of changes:
 src/lib/cc/session.cc                 |    2 +-
 src/lib/cc/tests/session_unittests.cc |   23 ++++++++++++-----------
 2 files changed, 13 insertions(+), 12 deletions(-)

-----------------------------------------------------------------------
diff --git a/src/lib/cc/session.cc b/src/lib/cc/session.cc
index 79b7541..bd743c7 100644
--- a/src/lib/cc/session.cc
+++ b/src/lib/cc/session.cc
@@ -478,7 +478,7 @@ Session::group_sendmsg(ConstElementPtr msg, std::string group,
     LOG_DEBUG(logger, DBG_TRACE_DETAILED, CC_GROUP_SEND).arg(msg->str()).
         arg(group);
     ElementPtr env = Element::createMap();
-    long int nseq = ++impl_->sequence_;
+    const long int nseq = ++impl_->sequence_;
 
     env->set(isc::util::CC_HEADER_TYPE,
              Element::create(isc::util::CC_COMMAND_SEND));
diff --git a/src/lib/cc/tests/session_unittests.cc b/src/lib/cc/tests/session_unittests.cc
index 789fa0d..1f66157 100644
--- a/src/lib/cc/tests/session_unittests.cc
+++ b/src/lib/cc/tests/session_unittests.cc
@@ -142,7 +142,7 @@ public:
     // buffer. Expects there's at leas one message in the buffer.
     SentMessage getSentMessage() {
         assert(!sent_messages_.empty());
-        SentMessage result(sent_messages_.front());
+        const SentMessage result(sent_messages_.front());
         sent_messages_.pop_front();
         return (result);
     }
@@ -173,25 +173,26 @@ protected:
         delete tds;
     }
 
-    // Check two elements are equal
-    void elementsEqual(const string& expected,
-                       const ConstElementPtr& actual) const
-    {
-        EXPECT_TRUE(Element::fromJSON(expected)->equals(*actual)) <<
-            "Elements differ, expected: " << expected <<
-            ", got: " << actual->toWire();
-    }
-
     // Check the session sent a message with the given header. The
     // message is hardcoded.
     void checkSentMessage(const string& expected_hdr, const char* description)
     {
         SCOPED_TRACE(description);
-        const SentMessage &msg(sess.getSentMessage());
+        const SentMessage& msg(sess.getSentMessage());
         elementsEqual(expected_hdr, msg.first);
         elementsEqual("{\"test\": 42}", msg.second);
     }
 
+private:
+    // Check two elements are equal
+    void elementsEqual(const string& expected,
+                       const ConstElementPtr& actual) const
+    {
+        EXPECT_TRUE(Element::fromJSON(expected)->equals(*actual)) <<
+            "Elements differ, expected: " << expected <<
+            ", got: " << actual->toWire();
+    }
+
 public:
     // used in the handler test
     // This handler first reads (and ignores) whatever message caused



More information about the bind10-changes mailing list