From 1487fce9686a1f52165ecd0676315f50a52c6bff Mon Sep 17 00:00:00 2001 From: Scott Cantor Date: Thu, 15 Dec 2011 09:29:25 +0000 Subject: [PATCH] Header and boost fixes for Debian --- xmltooling/AbstractXMLObject.h | 2 ++ xmltooling/security/impl/ChainingTrustEngine.cpp | 4 ++-- xmltooling/util/XMLHelper.cpp | 9 +++++---- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/xmltooling/AbstractXMLObject.h b/xmltooling/AbstractXMLObject.h index 49a0bbf..3dd53ff 100644 --- a/xmltooling/AbstractXMLObject.h +++ b/xmltooling/AbstractXMLObject.h @@ -31,6 +31,8 @@ #include #include +#include + #if defined (_MSC_VER) #pragma warning( push ) #pragma warning( disable : 4250 4251 ) diff --git a/xmltooling/security/impl/ChainingTrustEngine.cpp b/xmltooling/security/impl/ChainingTrustEngine.cpp index 81fbd55..cd9fd87 100644 --- a/xmltooling/security/impl/ChainingTrustEngine.cpp +++ b/xmltooling/security/impl/ChainingTrustEngine.cpp @@ -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)); diff --git a/xmltooling/util/XMLHelper.cpp b/xmltooling/util/XMLHelper.cpp index cdbd60b..88dccbe 100644 --- a/xmltooling/util/XMLHelper.cpp +++ b/xmltooling/util/XMLHelper.cpp @@ -131,10 +131,11 @@ XMLObject* XMLHelper::getXMLObjectById(XMLObject& tree, const XMLCh* id) void XMLHelper::getNonVisiblyUsedPrefixes(const XMLObject& tree, map& prefixes) { map 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::const_iterator i = tree.getOrderedChildren().begin(); i != tree.getOrderedChildren().end(); ++i) { + if (*i) { + getNonVisiblyUsedPrefixes(*(*i), child_prefixes); + } + } const set& nsset = tree.getNamespaces(); for (set::const_iterator ns = nsset.begin(); ns != nsset.end(); ++ns) { // Check for xmlns:xml. -- 2.1.4