X-Git-Url: http://www.project-moonshot.org/gitweb/?p=shibboleth%2Fcpp-xmltooling.git;a=blobdiff_plain;f=xmltooling%2FAbstractComplexElement.cpp;h=a8e68ef7512266a8004099305a49bbb08bb4ff44;hp=fa1e6eff7bbec636cea2caa115e13b58ab45b672;hb=HEAD;hpb=e93ce2c962c535ff88f26427e9aeb572f83976e1 diff --git a/xmltooling/AbstractComplexElement.cpp b/xmltooling/AbstractComplexElement.cpp index fa1e6ef..a8e68ef 100644 --- a/xmltooling/AbstractComplexElement.cpp +++ b/xmltooling/AbstractComplexElement.cpp @@ -54,17 +54,28 @@ AbstractComplexElement::AbstractComplexElement(const AbstractComplexElement& src } AbstractComplexElement::~AbstractComplexElement() { +#ifdef XMLTOOLING_XERCESC_HAS_XMLBYTE_RELEASE + static void (*release)(XMLCh**) = &XMLString::release; +#else static void (*release)(XMLCh**,MemoryManager*) = &XMLString::release; +#endif for_each(m_children.begin(), m_children.end(), cleanup()); - for_each(m_text.begin(), m_text.end(), lambda::bind(release, &_1, XMLPlatformUtils::fgMemoryManager)); + for_each(m_text.begin(), m_text.end(), + lambda::bind( + release, &_1 +#ifndef XMLTOOLING_XERCESC_HAS_XMLBYTE_RELEASE + ,XMLPlatformUtils::fgMemoryManager +#endif + ) + ); } bool AbstractComplexElement::hasChildren() const { if (m_children.empty()) return false; - return (find_if(m_children.begin(), m_children.end(), (_1 != nullptr)) != m_children.end()); + return (find_if(m_children.begin(), m_children.end(), (_1 != ((XMLObject*)nullptr))) != m_children.end()); } const list& AbstractComplexElement::getOrderedChildren() const