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 2007/02/23 14:22:24 UTC
svn commit: r510941 - /xerces/c/trunk/src/xercesc/util/QName.cpp
Author: amassari
Date: Fri Feb 23 05:22:24 2007
New Revision: 510941
URL: http://svn.apache.org/viewvc?view=rev&rev=510941
Log:
Reuse existing method
Modified:
xerces/c/trunk/src/xercesc/util/QName.cpp
Modified: xerces/c/trunk/src/xercesc/util/QName.cpp
URL: http://svn.apache.org/viewvc/xerces/c/trunk/src/xercesc/util/QName.cpp?view=diff&rev=510941&r1=510940&r2=510941
==============================================================================
--- xerces/c/trunk/src/xercesc/util/QName.cpp (original)
+++ xerces/c/trunk/src/xercesc/util/QName.cpp Fri Feb 23 05:22:24 2007
@@ -344,20 +344,7 @@
void QName::setLocalPart(const XMLCh* localPart)
{
- unsigned int newLen;
-
- newLen = XMLString::stringLen(localPart);
- if (!fLocalPartBufSz || (newLen > fLocalPartBufSz))
- {
- fMemoryManager->deallocate(fLocalPart); //delete [] fLocalPart;
- fLocalPart = 0;
- fLocalPartBufSz = newLen + 8;
- fLocalPart = (XMLCh*) fMemoryManager->allocate
- (
- (fLocalPartBufSz + 1) * sizeof(XMLCh)
- ); //new XMLCh[fLocalPartBufSz + 1];
- }
- XMLString::moveChars(fLocalPart, localPart, newLen + 1);
+ setNLocalPart(localPart, XMLString::stringLen(localPart));
}
void QName::setNLocalPart(const XMLCh* localPart, const unsigned int newLen)
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xerces.apache.org
For additional commands, e-mail: commits-help@xerces.apache.org