Header and boost fixes for Debian
authorScott Cantor <cantor.2@osu.edu>
Thu, 15 Dec 2011 09:44:09 +0000 (09:44 +0000)
committerScott Cantor <cantor.2@osu.edu>
Thu, 15 Dec 2011 09:44:09 +0000 (09:44 +0000)
saml/binding/ArtifactMap.h
saml/binding/SecurityPolicy.h
saml/profile/impl/IgnoreRule.cpp
saml/saml2/metadata/impl/AbstractMetadataProvider.cpp

index 36bdc23..6c7465c 100644 (file)
@@ -30,6 +30,7 @@
 #include <saml/base.h>
 
 #include <string>
+#include <memory>
 #include <xercesc/dom/DOM.hpp>
 
 namespace xmltooling {
index 72e0233..5d0ba22 100644 (file)
@@ -31,6 +31,7 @@
 
 #include <ctime>
 #include <vector>
+#include <memory>
 #include <xmltooling/unicode.h>
 
 #if defined (_MSC_VER)
index a9673db..68a736e 100644 (file)
@@ -28,6 +28,7 @@
 #include "exceptions.h"
 #include "binding/SecurityPolicyRule.h"
 
+#include <memory>
 #include <xmltooling/logging.h>
 #include <xmltooling/QName.h>
 #include <xmltooling/XMLObject.h>
index 40180f4..6cd7273 100644 (file)
@@ -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<const Credential*>::size_type AbstractMetadataProvider::resolve(
@@ -339,13 +336,9 @@ vector<const Credential*>::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<const Credential*>::* push_back)(const Credential* const &) = &vector<const Credential*>::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();
 }