Author: amassari
Date: Mon Apr 24 12:14:15 2006
New Revision: 396658

URL: http://svn.apache.org/viewcvs?rev=396658&view=rev
Log:
Performance fix

Modified:
    
xerces/c/branches/xerces-2.7/src/xercesc/validators/schema/identity/ValueStore.cpp

Modified: 
xerces/c/branches/xerces-2.7/src/xercesc/validators/schema/identity/ValueStore.cpp
URL: 
http://svn.apache.org/viewcvs/xerces/c/branches/xerces-2.7/src/xercesc/validators/schema/identity/ValueStore.cpp?rev=396658&r1=396657&r2=396658&view=diff
==============================================================================
--- 
xerces/c/branches/xerces-2.7/src/xercesc/validators/schema/identity/ValueStore.cpp
 (original)
+++ 
xerces/c/branches/xerces-2.7/src/xercesc/validators/schema/identity/ValueStore.cpp
 Mon Apr 24 12:14:15 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]

Reply via email to