You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by pe...@apache.org on 2002/10/03 20:13:38 UTC

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

peiyongz    2002/10/03 11:13:38

  Modified:    c/src/xercesc/dom/impl DOMWriterImpl.cpp
  Log:
  Bug#12560 Use const in DOMWriter - patch from Duncan Stodart
                                                               (Duncan_Stodart@insession.com )
  
  Revision  Changes    Path
  1.18      +12 -8     xml-xerces/c/src/xercesc/dom/impl/DOMWriterImpl.cpp
  
  Index: DOMWriterImpl.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/xercesc/dom/impl/DOMWriterImpl.cpp,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- DOMWriterImpl.cpp	24 Sep 2002 20:19:14 -0000	1.17
  +++ DOMWriterImpl.cpp	3 Oct 2002 18:13:38 -0000	1.18
  @@ -57,6 +57,10 @@
   /*
    * $Id$
    * $Log$
  + * Revision 1.18  2002/10/03 18:13:38  peiyongz
  + * Bug#12560 Use const in DOMWriter - patch from Duncan Stodart
  + *                                                              (Duncan_Stodart@insession.com )
  + *
    * Revision 1.17  2002/09/24 20:19:14  tng
    * Performance: use XMLString::equals instead of XMLString::compareString
    * and check for null string directly isntead of calling XMLString::stringLen
  @@ -620,8 +624,8 @@
   	}
   	else
   	{
  -        DOMDocument *docu = (nodeToWrite->getNodeType() == DOMNode::DOCUMENT_NODE)?
  -                            (DOMDocument*)nodeToWrite : nodeToWrite->getOwnerDocument();
  +        const DOMDocument *docu = (nodeToWrite->getNodeType() == DOMNode::DOCUMENT_NODE)?
  +                            (const DOMDocument*)nodeToWrite : nodeToWrite->getOwnerDocument();
           if (docu)
           {
               const XMLCh* tmpEncoding = docu->getEncoding();
  @@ -748,7 +752,7 @@
   	case DOMNode::DOCUMENT_NODE: // Not to be shown to Filter
           {
   			setURCharRef();
  -            DOMDocument *docu = (DOMDocument*)nodeToWrite;
  +            const DOMDocument *docu = (const DOMDocument*)nodeToWrite;
   
               //[23] XMLDecl      ::= '<?xml' VersionInfo EncodingDecl? SDDecl? S? '?>'
               //[24] VersionInfo  ::= S 'version' Eq ("'" VersionNum "'" | '"' VersionNum '"')
  @@ -1001,7 +1005,7 @@
   
   	case DOMNode::DOCUMENT_TYPE_NODE:  // Not to be shown to Filter
   		{
  -            DOMDocumentType *doctype = (DOMDocumentType *)nodeToWrite;;
  +            const DOMDocumentType *doctype = (const DOMDocumentType *)nodeToWrite;;
   
   			fFormatter->setEscapeFlags(XMLFormatter::NoEscapes);
               TRY_CATCH_THROW
  @@ -1066,15 +1070,15 @@
   			fFormatter->setEscapeFlags(XMLFormatter::NoEscapes);
   			*fFormatter << gStartEntity	<< nodeName;
   
  -			const XMLCh * id = ((DOMEntity*)nodeToWrite)->getPublicId();
  +			const XMLCh * id = ((const DOMEntity*)nodeToWrite)->getPublicId();
   			if (id)
   				*fFormatter << gPublic << id << chDoubleQuote;
   
  -			id = ((DOMEntity*)nodeToWrite)->getSystemId();
  +			id = ((const DOMEntity*)nodeToWrite)->getSystemId();
   			if (id)
   				*fFormatter << gSystem << id << chDoubleQuote;
   
  -			id = ((DOMEntity*)nodeToWrite)->getNotationName();
  +			id = ((const DOMEntity*)nodeToWrite)->getNotationName();
   			if (id)
   				*fFormatter << gNotation << id << chDoubleQuote;
   
  
  
  

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