Fix init order.
authorscantor <scantor@cb58f699-b61c-0410-a6fe-9272a202ed29>
Sun, 6 Mar 2011 04:59:02 +0000 (04:59 +0000)
committerscantor <scantor@cb58f699-b61c-0410-a6fe-9272a202ed29>
Sun, 6 Mar 2011 04:59:02 +0000 (04:59 +0000)
git-svn-id: https://svn.shibboleth.net/cpp-sp/branches/REL_2@3408 cb58f699-b61c-0410-a6fe-9272a202ed29

shibsp/attribute/filtering/impl/AttributeScopeRegexFunctor.cpp
shibsp/attribute/filtering/impl/AttributeValueStringFunctor.cpp

index f27e848..5109b9c 100644 (file)
@@ -53,7 +53,7 @@ namespace shibsp {
         bool matches(const Attribute& attribute, size_t index) const;
 
     public:
-        AttributeScopeRegexFunctor(const DOMElement* e) : m_regex(nullptr), m_attributeID(XMLHelper::getAttrString(e, nullptr, attributeID)) {
+        AttributeScopeRegexFunctor(const DOMElement* e) : m_attributeID(XMLHelper::getAttrString(e, nullptr, attributeID)), m_regex(nullptr) {
             const XMLCh* r = e ? e->getAttributeNS(nullptr,regex) : nullptr;
             if (!r || !*r)
                 throw ConfigurationException("AttributeScopeRegex MatchFunctor requires non-empty regex attribute.");
index b7ac084..d29a403 100644 (file)
@@ -53,8 +53,8 @@ namespace shibsp {
 
     public:
         AttributeValueStringFunctor(const DOMElement* e)
-            : m_value(e ? xmltooling::toUTF8(e->getAttributeNS(nullptr,value)) : nullptr),
-                m_attributeID(XMLHelper::getAttrString(e, nullptr, attributeID)) {
+               : m_attributeID(XMLHelper::getAttrString(e, nullptr, attributeID)),
+                 m_value(e ? xmltooling::toUTF8(e->getAttributeNS(nullptr,value)) : nullptr) {
             if (!m_value || !*m_value) {
                 delete[] m_value;
                 throw ConfigurationException("AttributeValueString MatchFunctor requires non-empty value attribute.");