tng         2002/09/24 13:21:06

  Modified:    c/src/xercesc/dom/impl DOMEntityImpl.cpp DOMNotationImpl.cpp
  Log:
  Performance: pre-allocate a target string for fixURI instead of using XMLBuffer
  
  Revision  Changes    Path
  1.12      +4 -2      xml-xerces/c/src/xercesc/dom/impl/DOMEntityImpl.cpp
  
  Index: DOMEntityImpl.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/xercesc/dom/impl/DOMEntityImpl.cpp,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- DOMEntityImpl.cpp 23 Sep 2002 20:01:27 -0000      1.11
  +++ DOMEntityImpl.cpp 24 Sep 2002 20:21:06 -0000      1.12
  @@ -176,7 +176,9 @@
   
   
   void DOMEntityImpl::setBaseURI(const XMLCh* baseURI) {
  -    fBaseURI = ((DOMDocumentImpl *)getOwnerDocument())->cloneString(baseURI);
  +    XMLCh* temp = (XMLCh*) ((DOMDocumentImpl 
*)getOwnerDocument())->allocate((XMLString::stringLen(baseURI) + 9)*sizeof(XMLCh));
  +    XMLString::fixURI(baseURI, temp);
  +    fBaseURI = temp;
   }
   
   
  
  
  
  1.9       +4 -2      xml-xerces/c/src/xercesc/dom/impl/DOMNotationImpl.cpp
  
  Index: DOMNotationImpl.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/xercesc/dom/impl/DOMNotationImpl.cpp,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- DOMNotationImpl.cpp       23 Sep 2002 19:41:07 -0000      1.8
  +++ DOMNotationImpl.cpp       24 Sep 2002 20:21:06 -0000      1.9
  @@ -161,7 +161,9 @@
   }
   
   void DOMNotationImpl::setBaseURI(const XMLCh* baseURI) {
  -    this->fBaseURI = ((DOMDocumentImpl *)getOwnerDocument())->cloneString(baseURI);
  +    XMLCh* temp = (XMLCh*) ((DOMDocumentImpl 
*)getOwnerDocument())->allocate((XMLString::stringLen(baseURI) + 9)*sizeof(XMLCh));
  +    XMLString::fixURI(baseURI, temp);
  +    fBaseURI = temp;
   }
   
   const XMLCh* DOMNotationImpl::getBaseURI() const
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to