[xmltooling] 38/65: Remove static warning guard variable
Ferenc Wágner
wferi-guest at moszumanska.debian.org
Thu Jun 30 13:07:39 UTC 2016
This is an automated email from the git hooks/post-receive script.
wferi-guest pushed a commit to branch debian/master
in repository xmltooling.
commit 36fbea51f878ad3d7b1a844e405e18ae38d7d8e1
Author: Scott Cantor <cantor.2 at osu.edu>
Date: Mon Jun 13 10:19:56 2016 -0400
Remove static warning guard variable
---
xmltooling/util/XMLHelper.cpp | 17 +++++++----------
1 file changed, 7 insertions(+), 10 deletions(-)
diff --git a/xmltooling/util/XMLHelper.cpp b/xmltooling/util/XMLHelper.cpp
index 79c3fb9..de32838 100644
--- a/xmltooling/util/XMLHelper.cpp
+++ b/xmltooling/util/XMLHelper.cpp
@@ -365,22 +365,19 @@ bool XMLHelper::getAttrBool(const DOMElement* e, bool defValue, const XMLCh* loc
bool XMLHelper::getCaseSensitive(const xercesc::DOMElement* e, bool defValue, const XMLCh* ns)
{
- static const XMLCh ignoreCase[] = UNICODE_LITERAL_10(i,g,n,o,r,e,C,a,s,e);
- static const XMLCh caseSensitive[] = UNICODE_LITERAL_13(c,a,s,e,S,e,n,s,i,t,i,v,e);
- static bool ignoreCaseWarned = false;
- bool result=defValue;
+ static const XMLCh ignoreCase[] = UNICODE_LITERAL_10(i,g,n,o,r,e,C,a,s,e);
+ static const XMLCh caseSensitive[] = UNICODE_LITERAL_13(c,a,s,e,S,e,n,s,i,t,i,v,e);
+ bool result = defValue;
if (e) {
const XMLCh* ic = e->getAttributeNS(ns, ignoreCase);
if (ic && * ic) {
- if (!ignoreCaseWarned) {
- logging::Category::getInstance(XMLTOOLING_LOGCAT ".XMLHelper").warn("Deprecated attribute \"ignoreCase\" encountered in configuration. Use \"caseSensitive\".");
- ignoreCaseWarned = true;
- }
+ logging::Category::getInstance(XMLTOOLING_LOGCAT ".XMLHelper").warn("Deprecated attribute \"ignoreCase\" encountered in configuration. Use \"caseSensitive\".");
+
// caseInsensitive = !"ignoreCase"
if (*ic == chLatin_t || *ic == chDigit_1)
result = false;
- if (*ic == chLatin_f || *ic == chDigit_0)
+ else if (*ic == chLatin_f || *ic == chDigit_0)
result = true;
}
const XMLCh* ci = e->getAttributeNS(ns, caseSensitive);
@@ -391,7 +388,7 @@ bool XMLHelper::getCaseSensitive(const xercesc::DOMElement* e, bool defValue, co
if (*ci == chLatin_t || *ci == chDigit_1) {
result = true;
}
- if (*ci == chLatin_f || *ci == chDigit_0) {
+ else if (*ci == chLatin_f || *ci == chDigit_0) {
result = false;
}
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-shibboleth/xmltooling.git
More information about the Pkg-shibboleth-devel
mailing list