MCPcopy Create free account
hub / github.com/boostorg/build / maybe_reserve

Function maybe_reserve

v2/engine/strings.c:115–125  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

113}
114
115static void maybe_reserve( string * self, size_t new_size )
116{
117 size_t capacity = self->capacity;
118 if ( capacity <= new_size )
119 {
120 size_t new_capacity = capacity;
121 while ( new_capacity <= new_size )
122 new_capacity <<= 1;
123 string_reserve_internal( self, new_capacity );
124 }
125}
126
127
128void string_append( string * self, char const * rhs )

Callers 2

string_appendFunction · 0.85
string_append_rangeFunction · 0.85

Calls 1

string_reserve_internalFunction · 0.85

Tested by

no test coverage detected