Lines Matching refs:nNewLength
364 void ByteString::ReallocBeforeWrite(size_t nNewLength) { in ReallocBeforeWrite() argument
365 if (m_pData && m_pData->CanOperateInPlace(nNewLength)) in ReallocBeforeWrite()
368 if (nNewLength == 0) { in ReallocBeforeWrite()
373 RetainPtr<StringData> pNewData(StringData::Create(nNewLength)); in ReallocBeforeWrite()
375 size_t nCopyLength = std::min(m_pData->m_nDataLength, nNewLength); in ReallocBeforeWrite()
385 void ByteString::AllocBeforeWrite(size_t nNewLength) { in AllocBeforeWrite() argument
386 if (m_pData && m_pData->CanOperateInPlace(nNewLength)) in AllocBeforeWrite()
389 if (nNewLength == 0) { in AllocBeforeWrite()
394 m_pData.Reset(StringData::Create(nNewLength)); in AllocBeforeWrite()
397 void ByteString::ReleaseBuffer(size_t nNewLength) { in ReleaseBuffer() argument
401 nNewLength = std::min(nNewLength, m_pData->m_nAllocLength); in ReleaseBuffer()
402 if (nNewLength == 0) { in ReleaseBuffer()
408 m_pData->m_nDataLength = nNewLength; in ReleaseBuffer()
409 m_pData->m_String[nNewLength] = 0; in ReleaseBuffer()
410 if (m_pData->m_nAllocLength - nNewLength >= 32) { in ReleaseBuffer()
414 ReallocBeforeWrite(nNewLength); in ReleaseBuffer()
666 size_t nNewLength = in Replace() local
669 if (nNewLength == 0) { in Replace()
674 RetainPtr<StringData> pNewData(StringData::Create(nNewLength)); in Replace()