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 2006/12/11 16:05:50 UTC
svn commit: r485689 -
/xerces/c/branches/xerces-2.7/src/xercesc/util/QName.cpp
Author: amassari
Date: Mon Dec 11 07:05:49 2006
New Revision: 485689
URL: http://svn.apache.org/viewvc?view=rev&rev=485689
Log:
Reuse existing method
Modified:
xerces/c/branches/xerces-2.7/src/xercesc/util/QName.cpp
Modified: xerces/c/branches/xerces-2.7/src/xercesc/util/QName.cpp
URL: http://svn.apache.org/viewvc/xerces/c/branches/xerces-2.7/src/xercesc/util/QName.cpp?view=diff&rev=485689&r1=485688&r2=485689
==============================================================================
--- xerces/c/branches/xerces-2.7/src/xercesc/util/QName.cpp (original)
+++ xerces/c/branches/xerces-2.7/src/xercesc/util/QName.cpp Mon Dec 11 07:05:49 2006
@@ -322,20 +322,7 @@
void QName::setPrefix(const XMLCh* prefix)
{
- unsigned int newLen;
-
- newLen = XMLString::stringLen(prefix);
- if (!fPrefixBufSz || (newLen > fPrefixBufSz))
- {
- fMemoryManager->deallocate(fPrefix); //delete [] fPrefix;
- fPrefix = 0;
- fPrefixBufSz = newLen + 8;
- fPrefix = (XMLCh*) fMemoryManager->allocate
- (
- (fPrefixBufSz + 1) * sizeof(XMLCh)
- ); //new XMLCh[fPrefixBufSz + 1];
- }
- XMLString::moveChars(fPrefix, prefix, newLen + 1);
+ setNPrefix(prefix, XMLString::stringLen(prefix));
}
void QName::setNPrefix(const XMLCh* prefix, const unsigned int newLen)
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xerces.apache.org
For additional commands, e-mail: commits-help@xerces.apache.org