MCPcopy Create free account
hub / github.com/ValveSoftware/GameNetworkingSockets / PutOverflow

Method PutOverflow

src/tier1/utlbuffer.cpp:1417–1435  ·  view source on GitHub ↗

----------------------------------------------------------------------------- Checks if a put is ok -----------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

1415// Checks if a put is ok
1416//-----------------------------------------------------------------------------
1417bool 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
1437bool CUtlBuffer::GetOverflow( int nSize )
1438{

Callers

nothing calls this directly

Calls 4

IsExternallyAllocatedMethod · 0.45
NumAllocatedMethod · 0.45
GrowMethod · 0.45

Tested by

no test coverage detected