Browse Source

[2053] Remove the dns::LabelSequence::getName() method

Mukund Sivaraman 13 years ago
parent
commit
fb5902b031
2 changed files with 3 additions and 14 deletions
  1. 0 11
      src/lib/dns/labelsequence.h
  2. 3 3
      src/lib/dns/tests/labelsequence_unittest.cc

+ 0 - 11
src/lib/dns/labelsequence.h

@@ -139,17 +139,6 @@ public:
     /// \return a string representation of the <code>LabelSequence</code>.
     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

+ 3 - 3
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;
     }
 }