Lines Matching refs:nNewLength
341 void ByteString::ReallocBeforeWrite(size_t nNewLength) { in ReallocBeforeWrite() argument
342 if (m_pData && m_pData->CanOperateInPlace(nNewLength)) in ReallocBeforeWrite()
345 if (nNewLength == 0) { in ReallocBeforeWrite()
350 RetainPtr<StringData> pNewData(StringData::Create(nNewLength)); in ReallocBeforeWrite()
352 size_t nCopyLength = std::min(m_pData->m_nDataLength, nNewLength); in ReallocBeforeWrite()
362 void ByteString::AllocBeforeWrite(size_t nNewLength) { in AllocBeforeWrite() argument
363 if (m_pData && m_pData->CanOperateInPlace(nNewLength)) in AllocBeforeWrite()
366 if (nNewLength == 0) { in AllocBeforeWrite()
371 m_pData.Reset(StringData::Create(nNewLength)); in AllocBeforeWrite()
374 void ByteString::ReleaseBuffer(size_t nNewLength) { in ReleaseBuffer() argument
378 nNewLength = std::min(nNewLength, m_pData->m_nAllocLength); in ReleaseBuffer()
379 if (nNewLength == 0) { in ReleaseBuffer()
385 m_pData->m_nDataLength = nNewLength; in ReleaseBuffer()
386 m_pData->m_String[nNewLength] = 0; in ReleaseBuffer()
387 if (m_pData->m_nAllocLength - nNewLength >= 32) { in ReleaseBuffer()
391 ReallocBeforeWrite(nNewLength); in ReleaseBuffer()
646 size_t nNewLength = in Replace() local
649 if (nNewLength == 0) { in Replace()
654 RetainPtr<StringData> pNewData(StringData::Create(nNewLength)); in Replace()