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...@apache.org on 2004/08/12 23:39:40 UTC

cvs commit: xml-xalan/c/src/xalanc/XalanSourceTree XalanSourceTreeDocument.cpp XalanSourceTreeDocument.hpp

dbertoni    2004/08/12 14:39:40

  Modified:    c/src/xalanc/XalanSourceTree XalanSourceTreeDocument.cpp
                        XalanSourceTreeDocument.hpp
  Log:
  Removed use of deque.
  
  Revision  Changes    Path
  1.8       +6 -11     xml-xalan/c/src/xalanc/XalanSourceTree/XalanSourceTreeDocument.cpp
  
  Index: XalanSourceTreeDocument.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/xalanc/XalanSourceTree/XalanSourceTreeDocument.cpp,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- XalanSourceTreeDocument.cpp	26 Feb 2004 23:03:38 -0000	1.7
  +++ XalanSourceTreeDocument.cpp	12 Aug 2004 21:39:40 -0000	1.8
  @@ -75,7 +75,7 @@
   	m_poolAllText(fPoolAllText),
   	m_elementsByID(),
   	m_unparsedEntityURIs(),
  -	m_nonPooledStrings(),
  +	m_nonPooledStrings(theValuesStringPoolBlockSize),
   	m_stringBuffer()
   {
   }
  @@ -112,7 +112,7 @@
   	m_poolAllText(fPoolAllText),
   	m_elementsByID(),
   	m_unparsedEntityURIs(),
  -	m_nonPooledStrings(),
  +	m_nonPooledStrings(eDefaultValuesStringPoolBlockSize),
   	m_stringBuffer()
   {
   }
  @@ -1101,16 +1101,11 @@
   	}
   	else
   	{
  -		const StringCollectionType::iterator	theIterator =
  -				m_nonPooledStrings.insert(m_nonPooledStrings.end(), XalanDOMString());
  +		XalanDOMString* const   theString =
  +				m_nonPooledStrings.create(chars, length);
  +        assert(theString != 0);
   
  -		XalanDOMString&		theString = *theIterator;
  -
  -		assign(theString, chars, length);
  -
  -		assert(length == theString.length());
  -
  -		return theString;
  +		return *theString;
   	}
   }
   
  
  
  
  1.5       +2 -6      xml-xalan/c/src/xalanc/XalanSourceTree/XalanSourceTreeDocument.hpp
  
  Index: XalanSourceTreeDocument.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/xalanc/XalanSourceTree/XalanSourceTreeDocument.hpp,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- XalanSourceTreeDocument.hpp	26 Feb 2004 23:03:38 -0000	1.4
  +++ XalanSourceTreeDocument.hpp	12 Aug 2004 21:39:40 -0000	1.5
  @@ -22,7 +22,6 @@
   
   
   
  -#include <deque>
   #include <map>
   
   
  @@ -36,6 +35,7 @@
   
   
   #include <xalanc/PlatformSupport/XalanArrayAllocator.hpp>
  +#include <xalanc/PlatformSupport/XalanDOMStringAllocator.hpp>
   #include <xalanc/PlatformSupport/XalanDOMStringPool.hpp>
   
   
  @@ -89,8 +89,6 @@
   				XalanDOMString,
   				XalanDOMString,
   				less<XalanDOMString> >							UnparsedEntityURIMapType;
  -
  -	typedef deque<XalanDOMString>								StringCollectionType;
   #else
   	typedef std::map<
   				const XalanDOMChar*,
  @@ -100,8 +98,6 @@
   	typedef std::map<
   				XalanDOMString,
   				XalanDOMString>									UnparsedEntityURIMapType;
  -
  -	typedef std::deque<XalanDOMString>							StringCollectionType;
   #endif
   
   	/**
  @@ -545,7 +541,7 @@
   
   	UnparsedEntityURIMapType						m_unparsedEntityURIs;
   
  -	StringCollectionType							m_nonPooledStrings;
  +	XalanDOMStringAllocator							m_nonPooledStrings;
   
   	XalanDOMString									m_stringBuffer;
   
  
  
  

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