[cpp-opensaml COMMIT] in /branches/REL_2/saml: binding/ArtifactMap.h binding/SecurityPolicy.h profile/impl/IgnoreRule...

noreply at shibboleth.net noreply at shibboleth.net
Thu Dec 15 09:44:10 GMT 2011


Author: scantor
Date: Thu Dec 15 09:44:09 2011
New Revision: 688

URL: http://svn.shibboleth.net/view/cpp-opensaml?rev=688&view=rev
Log:
Header and boost fixes for Debian

Modified:
    branches/REL_2/saml/binding/ArtifactMap.h
    branches/REL_2/saml/binding/SecurityPolicy.h
    branches/REL_2/saml/profile/impl/IgnoreRule.cpp
    branches/REL_2/saml/saml2/metadata/impl/AbstractMetadataProvider.cpp

Modified: branches/REL_2/saml/binding/ArtifactMap.h
URL: http://svn.shibboleth.net/view/cpp-opensaml/branches/REL_2/saml/binding/ArtifactMap.h?rev=688&r1=687&r2=688&view=diff
==============================================================================
--- branches/REL_2/saml/binding/ArtifactMap.h (original)
+++ branches/REL_2/saml/binding/ArtifactMap.h Thu Dec 15 09:44:09 2011
@@ -30,6 +30,7 @@
 #include <saml/base.h>
 
 #include <string>
+#include <memory>
 #include <xercesc/dom/DOM.hpp>
 
 namespace xmltooling {

Modified: branches/REL_2/saml/binding/SecurityPolicy.h
URL: http://svn.shibboleth.net/view/cpp-opensaml/branches/REL_2/saml/binding/SecurityPolicy.h?rev=688&r1=687&r2=688&view=diff
==============================================================================
--- branches/REL_2/saml/binding/SecurityPolicy.h (original)
+++ branches/REL_2/saml/binding/SecurityPolicy.h Thu Dec 15 09:44:09 2011
@@ -31,6 +31,7 @@
 
 #include <ctime>
 #include <vector>
+#include <memory>
 #include <xmltooling/unicode.h>
 
 #if defined (_MSC_VER)

Modified: branches/REL_2/saml/profile/impl/IgnoreRule.cpp
URL: http://svn.shibboleth.net/view/cpp-opensaml/branches/REL_2/saml/profile/impl/IgnoreRule.cpp?rev=688&r1=687&r2=688&view=diff
==============================================================================
--- branches/REL_2/saml/profile/impl/IgnoreRule.cpp (original)
+++ branches/REL_2/saml/profile/impl/IgnoreRule.cpp Thu Dec 15 09:44:09 2011
@@ -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>

Modified: branches/REL_2/saml/saml2/metadata/impl/AbstractMetadataProvider.cpp
URL: http://svn.shibboleth.net/view/cpp-opensaml/branches/REL_2/saml/saml2/metadata/impl/AbstractMetadataProvider.cpp?rev=688&r1=687&r2=688&view=diff
==============================================================================
--- branches/REL_2/saml/saml2/metadata/impl/AbstractMetadataProvider.cpp (original)
+++ branches/REL_2/saml/saml2/metadata/impl/AbstractMetadataProvider.cpp Thu Dec 15 09:44:09 2011
@@ -319,13 +319,10 @@
     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 @@
     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();
 }
 



More information about the commits mailing list