You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by am...@apache.org on 2004/08/30 18:06:01 UTC

cvs commit: xml-xerces/c/src/xercesc/dom/impl DOMAttrImpl.cpp DOMElementImpl.cpp

amassari    2004/08/30 09:06:01

  Modified:    c/src/xercesc/dom/impl DOMAttrImpl.cpp DOMElementImpl.cpp
  Log:
  Don't allocate a DOMTypeInfo object if there is no type info to store
  
  Revision  Changes    Path
  1.19      +3 -2      xml-xerces/c/src/xercesc/dom/impl/DOMAttrImpl.cpp
  
  Index: DOMAttrImpl.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/xercesc/dom/impl/DOMAttrImpl.cpp,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- DOMAttrImpl.cpp	1 Apr 2004 22:05:31 -0000	1.18
  +++ DOMAttrImpl.cpp	30 Aug 2004 16:06:01 -0000	1.19
  @@ -330,7 +330,8 @@
   
   void DOMAttrImpl::setTypeInfo(const XMLCh* typeName, const XMLCh* typeURI) 
   {
  -    fSchemaType = new (getOwnerDocument()) DOMTypeInfoImpl(typeName, typeURI, (DOMDocumentImpl *)getOwnerDocument());
  +    if(typeName || typeURI)
  +        fSchemaType = new (getOwnerDocument()) DOMTypeInfoImpl(typeName, typeURI, (DOMDocumentImpl *)getOwnerDocument());
   }
   
   
  
  
  
  1.26      +3 -2      xml-xerces/c/src/xercesc/dom/impl/DOMElementImpl.cpp
  
  Index: DOMElementImpl.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/xercesc/dom/impl/DOMElementImpl.cpp,v
  retrieving revision 1.25
  retrieving revision 1.26
  diff -u -r1.25 -r1.26
  --- DOMElementImpl.cpp	1 Apr 2004 22:05:31 -0000	1.25
  +++ DOMElementImpl.cpp	30 Aug 2004 16:06:01 -0000	1.26
  @@ -693,7 +693,8 @@
   
   void DOMElementImpl::setTypeInfo(const XMLCh* typeName, const XMLCh* typeURI) 
   {
  -    fSchemaType = new (getOwnerDocument()) DOMTypeInfoImpl(typeName, typeURI, (DOMDocumentImpl *)getOwnerDocument());
  +    if(typeName || typeURI)
  +        fSchemaType = new (getOwnerDocument()) DOMTypeInfoImpl(typeName, typeURI, (DOMDocumentImpl *)getOwnerDocument());
   }
   
   XERCES_CPP_NAMESPACE_END
  
  
  

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