You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by db...@locus.apache.org on 2000/05/08 19:22:33 UTC

cvs commit: xml-xalan/c/src/XercesPlatformSupport XercesDOMPrintWriter.cpp

dbertoni    00/05/08 10:22:32

  Modified:    c/src/XercesPlatformSupport XercesDOMPrintWriter.cpp
  Log:
  Fixed some asserts and removed some old code that was not compiled in.
  
  Revision  Changes    Path
  1.5       +1 -23     xml-xalan/c/src/XercesPlatformSupport/XercesDOMPrintWriter.cpp
  
  Index: XercesDOMPrintWriter.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XercesPlatformSupport/XercesDOMPrintWriter.cpp,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- XercesDOMPrintWriter.cpp	2000/04/25 19:48:54	1.4
  +++ XercesDOMPrintWriter.cpp	2000/05/08 17:22:31	1.5
  @@ -128,8 +128,7 @@
   			unsigned int	theLength)
   {
   	assert(s != 0);
  -	assert(theOffset >= 0 && theOffset < length(s));
  -	assert(theLength >= 0 || theLength == -1);
  +	assert(length(s) == 0 || theOffset < length(s));
   
   	if (theLength == -1)
   	{
  @@ -169,28 +168,7 @@
   			unsigned int		theOffset,
   			unsigned int		theLength)
   {
  -	assert(theOffset >= 0);
  -	assert(theLength >= 0 || theLength == -1);
  -	assert(theLength == -1 && length(s) > theOffset || length(s) >= theOffset + theLength);
  -
  -#if 1
   	write(c_wstr(s), theOffset, theLength);
  -#else
  -	if (theOffset == 0 && theLength == -1)
  -	{
  -		m_OutputStream << s;
  -	}
  -	else
  -	{
  -		const long	theStopIndex = (theLength == -1) ? length(s) :
  -													   theOffset + theLength;
  -
  -		for (long i = theOffset; i < theStopIndex; i++)
  -		{
  -			m_OutputStream << s.charAt(i);
  -		}
  -	}
  -#endif
   }