----------------------------------------------------------------------------- Checks if a put is ok -----------------------------------------------------------------------------
| 1415 | // Checks if a put is ok |
| 1416 | //----------------------------------------------------------------------------- |
| 1417 | bool CUtlBuffer::PutOverflow( int nSize ) |
| 1418 | { |
| 1419 | if ( m_Memory.IsExternallyAllocated() ) |
| 1420 | { |
| 1421 | if ( !IsGrowable() ) |
| 1422 | return false; |
| 1423 | |
| 1424 | m_Memory.ConvertToGrowableMemory( 0 ); |
| 1425 | } |
| 1426 | |
| 1427 | int nGrowDelta = (m_Put + nSize) - m_Memory.NumAllocated(); |
| 1428 | |
| 1429 | if ( nGrowDelta > 0 ) |
| 1430 | { |
| 1431 | m_Memory.Grow( nGrowDelta ); |
| 1432 | } |
| 1433 | |
| 1434 | return true; |
| 1435 | } |
| 1436 | |
| 1437 | bool CUtlBuffer::GetOverflow( int nSize ) |
| 1438 | { |
nothing calls this directly
no test coverage detected