Parcourir la source

[trac846] Use correct iterator

It used iterator with different comparator. Glibc stl with debug mode
rejected this while trying to compile it.
Michal 'vorner' Vaner il y a 14 ans
Parent
commit
e5cae84640
1 fichiers modifiés avec 3 ajouts et 2 suppressions
  1. 3 2
      src/lib/dns/messagerenderer.cc

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

@@ -228,8 +228,9 @@ MessageRenderer::writeName(const Name& name, const bool compress) {
     name.toWire(impl_->nbuffer_);
 
     unsigned int i;
-    std::set<NameCompressNode>::const_iterator notfound = impl_->nodeset_.end();
-    std::set<NameCompressNode>::const_iterator n = notfound;
+    std::set<NameCompressNode, NameCompare>::const_iterator notfound =
+        impl_->nodeset_.end();
+    std::set<NameCompressNode, NameCompare>::const_iterator n = notfound;
 
     // Find the longest ancestor name in the rendered set that matches the
     // given name.