Author: amassari
Date: Mon Apr 24 12:13:11 2006
New Revision: 396656
URL: http://svn.apache.org/viewcvs?rev=396656&view=rev
Log:
Performance fix
Modified:
xerces/c/trunk/src/xercesc/validators/schema/identity/ValueStore.cpp
Modified: xerces/c/trunk/src/xercesc/validators/schema/identity/ValueStore.cpp
URL:
http://svn.apache.org/viewcvs/xerces/c/trunk/src/xercesc/validators/schema/identity/ValueStore.cpp?rev=396656&r1=396655&r2=396656&view=diff
==============================================================================
--- xerces/c/trunk/src/xercesc/validators/schema/identity/ValueStore.cpp
(original)
+++ xerces/c/trunk/src/xercesc/validators/schema/identity/ValueStore.cpp Mon
Apr 24 12:13:11 2006
@@ -223,10 +223,10 @@
return (XMLString::equals(val1, val2));
}
- unsigned int val1Len = XMLString::stringLen(val1);
- unsigned int val2Len = XMLString::stringLen(val2);
+ bool val1IsEmpty = (val1==0 || *val1==0);
+ bool val2IsEmpty = (val2==0 || *val2==0);
- if (!val1Len && !val2Len) {
+ if (val1IsEmpty && val2IsEmpty) {
if (dv1 == dv2) {
return true;
@@ -235,7 +235,7 @@
return false;
}
- if (!val1Len || !val2Len) {
+ if (val1IsEmpty || val2IsEmpty) {
return false;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]