Browse Source

[2052] Rename partial_compare() to just compare()

Mukund Sivaraman 13 years ago
parent
commit
dbef0e2519
3 changed files with 19 additions and 19 deletions
  1. 6 6
      src/lib/dns/labelsequence.cc
  2. 7 7
      src/lib/dns/name.cc
  3. 6 6
      src/lib/dns/name.h

+ 6 - 6
src/lib/dns/labelsequence.cc

@@ -78,12 +78,12 @@ LabelSequence::compare(const LabelSequence& other,
         return (NameComparisonResult(0, 0, NameComparisonResult::NONE));
     }
 
-    return (name_.partial_compare(other.name_,
-                                  first_label_,
-                                  other.first_label_,
-                                  last_label_,
-                                  other.last_label_,
-                                  case_sensitive));
+    return (name_.compare(other.name_,
+                          first_label_,
+                          other.first_label_,
+                          last_label_,
+                          other.last_label_,
+                          case_sensitive));
 }
 
 void

+ 7 - 7
src/lib/dns/name.cc

@@ -507,16 +507,16 @@ Name::toText(bool omit_final_dot) const {
 
 NameComparisonResult
 Name::compare(const Name& other) const {
-    return (partial_compare(other, 0, 0, labelcount_, other.labelcount_));
+    return (compare(other, 0, 0, labelcount_, other.labelcount_));
 }
 
 NameComparisonResult
-Name::partial_compare(const Name& other,
-                      unsigned int first_label,
-                      unsigned int first_label_other,
-                      unsigned int last_label,
-                      unsigned int last_label_other,
-                      bool case_sensitive) const {
+Name::compare(const Name& other,
+              unsigned int first_label,
+              unsigned int first_label_other,
+              unsigned int last_label,
+              unsigned int last_label_other,
+              bool case_sensitive) const {
     // Determine the relative ordering under the DNSSEC order relation of
     // 'this' and 'other', and also determine the hierarchical relationship
     // of the names.

+ 6 - 6
src/lib/dns/name.h

@@ -422,12 +422,12 @@ private:
     /// \param case_sensitive If true, comparison is case-insensitive
     /// \return a <code>NameComparisonResult</code> object representing the
     /// comparison result.
-    NameComparisonResult partial_compare(const Name& other,
-                                         unsigned int first_label,
-                                         unsigned int first_label_other,
-                                         unsigned int last_label,
-                                         unsigned int last_label_other,
-                                         bool case_sensitive = false) const;
+    NameComparisonResult compare(const Name& other,
+                                 unsigned int first_label,
+                                 unsigned int first_label_other,
+                                 unsigned int last_label,
+                                 unsigned int last_label_other,
+                                 bool case_sensitive = false) const;
 
 public:
     /// \brief Return true iff two names are equal.