You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by tn...@apache.org on 2002/09/24 21:57:21 UTC

cvs commit: xml-xerces/c/src/xercesc/validators/schema/identity IdentityConstraint.cpp ValueStore.cpp

tng         2002/09/24 12:57:21

  Modified:    c/src/xercesc/validators/schema/identity
                        IdentityConstraint.cpp ValueStore.cpp
  Log:
  Performance: use XMLString::equals instead of XMLString::compareString
  
  Revision  Changes    Path
  1.2       +4 -1      xml-xerces/c/src/xercesc/validators/schema/identity/IdentityConstraint.cpp
  
  Index: IdentityConstraint.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/xercesc/validators/schema/identity/IdentityConstraint.cpp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- IdentityConstraint.cpp	1 Feb 2002 22:22:50 -0000	1.1
  +++ IdentityConstraint.cpp	24 Sep 2002 19:57:20 -0000	1.2
  @@ -56,8 +56,11 @@
   
   /*
    * $Log$
  - * Revision 1.1  2002/02/01 22:22:50  peiyongz
  - * Initial revision
  + * Revision 1.2  2002/09/24 19:57:20  tng
  + * Performance: use XMLString::equals instead of XMLString::compareString
  + *
  + * Revision 1.1.1.1  2002/02/01 22:22:50  peiyongz
  + * sane_include
    *
    * Revision 1.2  2001/11/15 17:10:19  knoaman
    * Particle derivation checking support.
  @@ -109,7 +112,7 @@
       if (getType() != other.getType())
           return false;
   
  -    if (XMLString::compareString(fIdentityConstraintName, other.fIdentityConstraintName))
  +    if (!XMLString::equals(fIdentityConstraintName, other.fIdentityConstraintName))
           return false;
   
       if (*fSelector != *(other.fSelector))
  
  
  
  1.3       +8 -5      xml-xerces/c/src/xercesc/validators/schema/identity/ValueStore.cpp
  
  Index: ValueStore.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/xercesc/validators/schema/identity/ValueStore.cpp,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ValueStore.cpp	18 Feb 2002 06:26:50 -0000	1.2
  +++ ValueStore.cpp	24 Sep 2002 19:57:20 -0000	1.3
  @@ -56,6 +56,9 @@
   
   /*
    * $Log$
  + * Revision 1.3  2002/09/24 19:57:20  tng
  + * Performance: use XMLString::equals instead of XMLString::compareString
  + *
    * Revision 1.2  2002/02/18 06:26:50  jberry
    * Quiet codewarrior compiler warnings
    *
  @@ -251,7 +254,7 @@
               }
           }
       }
  -    
  +
       return false;
   }
   
  @@ -260,7 +263,7 @@
   
       // if either validator's null, fall back on string comparison
       if(!dv1 || !dv2) {
  -        return ((XMLString::compareString(val1, val2)) == 0);
  +        return (XMLString::equals(val1, val2));
       }
   
       unsigned int val1Len = XMLString::stringLen(val1);
  @@ -283,7 +286,7 @@
       // As always we are obliged to compare by reference...
       if (dv1 == dv2) {
           return ((dv1->compare(val1, val2)) == 0);
  -    } 
  +    }
   
       // see if this.fValidator is derived from value.fValidator:
       DatatypeValidator* tempVal = dv1;
  @@ -301,7 +304,7 @@
       }
   
       // if we're here it means the types weren't related.  Must fall back to strings:
  -    return ((XMLString::compareString(val1, val2)) == 0); 
  +    return (XMLString::equals(val1, val2));
   }
   
   
  @@ -347,7 +350,7 @@
   void ValueStore::reportNilError(IdentityConstraint* const ic) {
   
       if (fDoReportError && ic->getType() == IdentityConstraint::KEY) {
  -        fScanner->getValidator()->emitError(XMLValid::IC_KeyMatchesNillable, 
  +        fScanner->getValidator()->emitError(XMLValid::IC_KeyMatchesNillable,
                                               ic->getElementName());
       }
   }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-cvs-help@xml.apache.org