File tree Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -65,11 +65,10 @@ Tvector find_common(const xmlpp::ustring& xpath,
65
65
66
66
if (namespaces)
67
67
{
68
- for (xmlpp::Node::PrefixNsMap::const_iterator it = namespaces->begin ();
69
- it != namespaces->end (); ++it)
68
+ for (const auto & [prefix, ns_uri] : *namespaces)
70
69
xmlXPathRegisterNs (ctxt,
71
- reinterpret_cast <const xmlChar*>(it-> first .c_str ()),
72
- reinterpret_cast <const xmlChar*>(it-> second .c_str ()));
70
+ reinterpret_cast <const xmlChar*>(prefix .c_str ()),
71
+ reinterpret_cast <const xmlChar*>(ns_uri .c_str ()));
73
72
}
74
73
75
74
auto result = xmlXPathEval ((const xmlChar*)xpath.c_str (), ctxt);
@@ -140,11 +139,10 @@ xmlXPathObject* eval_common(const xmlpp::ustring& xpath,
140
139
141
140
if (namespaces)
142
141
{
143
- for (xmlpp::Node::PrefixNsMap::const_iterator it = namespaces->begin ();
144
- it != namespaces->end (); ++it)
142
+ for (const auto & [prefix, ns_uri] : *namespaces)
145
143
xmlXPathRegisterNs (ctxt,
146
- reinterpret_cast <const xmlChar*>(it-> first .c_str ()),
147
- reinterpret_cast <const xmlChar*>(it-> second .c_str ()));
144
+ reinterpret_cast <const xmlChar*>(prefix .c_str ()),
145
+ reinterpret_cast <const xmlChar*>(ns_uri .c_str ()));
148
146
}
149
147
150
148
auto xpath_value = xmlXPathEvalExpression (
You can’t perform that action at this time.
0 commit comments