Header and boost fixes for Debian
authorScott Cantor <cantor.2@osu.edu>
Thu, 15 Dec 2011 09:29:25 +0000 (09:29 +0000)
committerScott Cantor <cantor.2@osu.edu>
Thu, 15 Dec 2011 09:29:25 +0000 (09:29 +0000)
xmltooling/AbstractXMLObject.h
xmltooling/security/impl/ChainingTrustEngine.cpp
xmltooling/util/XMLHelper.cpp

index 49a0bbf..3dd53ff 100644 (file)
@@ -31,6 +31,8 @@
 #include <xmltooling/QName.h>
 #include <xmltooling/XMLObject.h>
 
+#include <memory>
+
 #if defined (_MSC_VER)
     #pragma warning( push )
     #pragma warning( disable : 4250 4251 )
index 81fbd55..cd9fd87 100644 (file)
@@ -52,7 +52,7 @@ namespace xmltooling {
 };
 
 static const XMLCh _TrustEngine[] =                 UNICODE_LITERAL_11(T,r,u,s,t,E,n,g,i,n,e);
-static const XMLCh type[] =                         UNICODE_LITERAL_4(t,y,p,e);
+static const XMLCh _type[] =                         UNICODE_LITERAL_4(t,y,p,e);
 
 ChainingTrustEngine::ChainingTrustEngine(const DOMElement* e) : TrustEngine(e)
 {
@@ -60,7 +60,7 @@ ChainingTrustEngine::ChainingTrustEngine(const DOMElement* e) : TrustEngine(e)
     e = e ? XMLHelper::getFirstChildElement(e, _TrustEngine) : nullptr;
     while (e) {
         try {
-            string t = XMLHelper::getAttrString(e, nullptr, type);
+            string t = XMLHelper::getAttrString(e, nullptr, _type);
             if (!t.empty()) {
                 log.info("building TrustEngine of type %s", t.c_str());
                 addTrustEngine(XMLToolingConfig::getConfig().TrustEngineManager.newPlugin(t.c_str(), e));
index cdbd60b..88dccbe 100644 (file)
@@ -131,10 +131,11 @@ XMLObject* XMLHelper::getXMLObjectById(XMLObject& tree, const XMLCh* id)
 void XMLHelper::getNonVisiblyUsedPrefixes(const XMLObject& tree, map<xstring,xstring>& prefixes)
 {
     map<xstring,xstring> child_prefixes;
-    for_each(
-        tree.getOrderedChildren().begin(), tree.getOrderedChildren().end(),
-        if_(_1 != ((XMLObject*)nullptr))[lambda::bind(&getNonVisiblyUsedPrefixes, boost::ref(*_1), boost::ref(child_prefixes))]
-        );
+    for(list<XMLObject*>::const_iterator i = tree.getOrderedChildren().begin(); i != tree.getOrderedChildren().end(); ++i) {
+        if (*i) {
+            getNonVisiblyUsedPrefixes(*(*i), child_prefixes);
+        }
+    }
     const set<Namespace>& nsset = tree.getNamespaces();
     for (set<Namespace>::const_iterator ns = nsset.begin(); ns != nsset.end(); ++ns) {
         // Check for xmlns:xml.