From: Mukund Sivaraman Date: Fri, 29 Jun 2012 00:08:08 +0000 (+0530) Subject: [2053] Remove the dns::LabelSequence::getName() method X-Git-Tag: trac2351_base~210 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=fb5902b031a00a249a32c7561b71e951e1aad6f0;p=thirdparty%2Fkea.git [2053] Remove the dns::LabelSequence::getName() method --- diff --git a/src/lib/dns/labelsequence.h b/src/lib/dns/labelsequence.h index f5d801bd17..9928a10e2f 100644 --- a/src/lib/dns/labelsequence.h +++ b/src/lib/dns/labelsequence.h @@ -139,17 +139,6 @@ public: /// \return a string representation of the LabelSequence. std::string toText() const; - /// \brief Returns the original Name object associated with this - /// LabelSequence - /// - /// While the Name should still be in scope during the lifetime of - /// the LabelSequence, it can still be useful to have access to it, - /// for instance in helper functions that are only passed the - /// LabelSequence itself. - /// - /// \return Reference to the original Name object - const Name& getName() const { return (name_); } - /// \brief Calculate a simple hash for the label sequence. /// /// This method calculates a hash value for the label sequence as binary diff --git a/src/lib/dns/tests/labelsequence_unittest.cc b/src/lib/dns/tests/labelsequence_unittest.cc index 6eb5dff887..be26246b24 100644 --- a/src/lib/dns/tests/labelsequence_unittest.cc +++ b/src/lib/dns/tests/labelsequence_unittest.cc @@ -149,14 +149,14 @@ getDataCheck(const uint8_t* expected_data, size_t expected_len, size_t len; const uint8_t* data = ls.getData(&len); ASSERT_EQ(expected_len, len) << "Expected data: " << expected_data << - " name: " << ls.getName().toText(); + ", label sequence: " << ls; EXPECT_EQ(expected_len, ls.getDataLength()) << "Expected data: " << expected_data << - " name: " << ls.getName().toText(); + ", label sequence: " << ls; for (size_t i = 0; i < len; ++i) { EXPECT_EQ(expected_data[i], data[i]) << "Difference at pos " << i << ": Expected data: " << expected_data << - " name: " << ls.getName().toText();; + ", label sequence: " << ls; } }