Parcourir la source

[master] Use temporary variables in Name::compare()

Mukund Sivaraman il y a 12 ans
Parent
commit
89e5546308
1 fichiers modifiés avec 3 ajouts et 2 suppressions
  1. 3 2
      src/lib/dns/name.cc

+ 3 - 2
src/lib/dns/name.cc

@@ -435,8 +435,9 @@ Name::toText(bool omit_final_dot) const {
 
 NameComparisonResult
 Name::compare(const Name& other) const {
-    LabelSequence ls(*this);
-    return (ls.compare(LabelSequence(other)));
+    const LabelSequence ls1(*this);
+    const LabelSequence ls2(other);
+    return (ls1.compare(ls2));
 }
 
 bool