You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by kn...@apache.org on 2002/04/02 17:31:48 UTC

cvs commit: xml-xerces/c/src/xercesc/util QName.cpp

knoaman     02/04/02 07:31:48

  Modified:    c/src/xercesc/util QName.cpp
  Log:
  Modiy QName comparison (operator=).
  
  Revision  Changes    Path
  1.2       +8 -3      xml-xerces/c/src/xercesc/util/QName.cpp
  
  Index: QName.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/xercesc/util/QName.cpp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- QName.cpp	1 Feb 2002 22:22:11 -0000	1.1
  +++ QName.cpp	2 Apr 2002 15:31:48 -0000	1.2
  @@ -56,8 +56,11 @@
   
   /*
    * $Log: QName.cpp,v $
  - * Revision 1.1  2002/02/01 22:22:11  peiyongz
  - * Initial revision
  + * Revision 1.2  2002/04/02 15:31:48  knoaman
  + * Modiy QName comparison (operator=).
  + *
  + * Revision 1.1.1.1  2002/02/01 22:22:11  peiyongz
  + * sane_include
    *
    * Revision 1.8  2001/12/06 17:48:36  tng
    * Performance Enhancement.  Added setNPrefix and setNLocalPart methods that allow code to take advantage of the fact that it knows the length of the prefix and local name, when possible.  That can avoid a copy of the prefix into a null-terminated temporary variable before copying into the fPrefix.
  @@ -414,9 +417,11 @@
   // -----------------------------------------------------------------------
   bool QName::operator==(const QName& qname)
   {
  -return (XMLString::compareString(fPrefix, qname.getPrefix())==0) &&
  -       (XMLString::compareString(fLocalPart, qname.getLocalPart())==0) &&
  -       (fURIId == qname.getURI());
  +    if (fURIId == 0) // null URI
  +        return (XMLString::compareString(getRawName(),qname.getRawName())==0);
  +
  +    return ((fURIId == qname.getURI()) &&
  +           (XMLString::compareString(fLocalPart, qname.getLocalPart())==0));
   }
   
   // ---------------------------------------------------------------------------
  
  
  

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