From: Scott Cantor Date: Thu, 15 Dec 2011 09:44:09 +0000 (+0000) Subject: Header and boost fixes for Debian X-Git-Tag: 2.5.0~54 X-Git-Url: http://www.project-moonshot.org/gitweb/?p=shibboleth%2Fcpp-opensaml.git;a=commitdiff_plain;h=49e16c539fc7c1e50b358e323ca9421a3ff4a6c8 Header and boost fixes for Debian --- diff --git a/saml/binding/ArtifactMap.h b/saml/binding/ArtifactMap.h index 36bdc23..6c7465c 100644 --- a/saml/binding/ArtifactMap.h +++ b/saml/binding/ArtifactMap.h @@ -30,6 +30,7 @@ #include #include +#include #include namespace xmltooling { diff --git a/saml/binding/SecurityPolicy.h b/saml/binding/SecurityPolicy.h index 72e0233..5d0ba22 100644 --- a/saml/binding/SecurityPolicy.h +++ b/saml/binding/SecurityPolicy.h @@ -31,6 +31,7 @@ #include #include +#include #include #if defined (_MSC_VER) diff --git a/saml/profile/impl/IgnoreRule.cpp b/saml/profile/impl/IgnoreRule.cpp index a9673db..68a736e 100644 --- a/saml/profile/impl/IgnoreRule.cpp +++ b/saml/profile/impl/IgnoreRule.cpp @@ -28,6 +28,7 @@ #include "exceptions.h" #include "binding/SecurityPolicyRule.h" +#include #include #include #include diff --git a/saml/saml2/metadata/impl/AbstractMetadataProvider.cpp b/saml/saml2/metadata/impl/AbstractMetadataProvider.cpp index 40180f4..6cd7273 100644 --- a/saml/saml2/metadata/impl/AbstractMetadataProvider.cpp +++ b/saml/saml2/metadata/impl/AbstractMetadataProvider.cpp @@ -319,13 +319,10 @@ const Credential* AbstractMetadataProvider::resolve(const CredentialCriteria* cr Lock lock(m_credentialLock.get()); const credmap_t::mapped_type& creds = resolveCredentials(metacrit->getRole()); - // Indirect iterator derefs the pointers in the vector to pass to the matches() method by reference. - credmap_t::mapped_type::const_iterator c = find_if( - creds.begin(), creds.end(), lambda::bind(&CredentialCriteria::matches, metacrit, boost::ref(*_1)) - ); - if (c != creds.end()) - return *c; - return nullptr; + for (credmap_t::mapped_type::const_iterator c = creds.begin(); c!=creds.end(); ++c) + if (metacrit->matches(*(*c))) + return *c; +return nullptr; } vector::size_type AbstractMetadataProvider::resolve( @@ -339,13 +336,9 @@ vector::size_type AbstractMetadataProvider::resolve( Lock lock(m_credentialLock.get()); const credmap_t::mapped_type& creds = resolveCredentials(metacrit->getRole()); - // Add matching creds to results array. - static void (vector::* push_back)(const Credential* const &) = &vector::push_back; - for_each( - creds.begin(), creds.end(), - if_(lambda::bind(&CredentialCriteria::matches, metacrit, boost::ref(*_1)))[lambda::bind(push_back, boost::ref(results), _1)] - ); - + for (credmap_t::mapped_type::const_iterator c = creds.begin(); c!=creds.end(); ++c) + if (metacrit->matches(*(*c))) + results.push_back(*c); return results.size(); }