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

Function extend_full

v2/engine/strings.c:102–113  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

100
101
102static void extend_full( string * self, char const * start, char const * finish )
103{
104 size_t new_size = self->capacity + ( finish - start );
105 size_t new_capacity = self->capacity;
106 size_t old_size = self->capacity;
107 while ( new_capacity < new_size + 1)
108 new_capacity <<= 1;
109 string_reserve_internal( self, new_capacity );
110 memcpy( self->value + old_size, start, new_size - old_size );
111 self->value[ new_size ] = 0;
112 self->size = new_size;
113}
114
115static void maybe_reserve( string * self, size_t new_size )
116{

Callers

nothing calls this directly

Calls 1

string_reserve_internalFunction · 0.85

Tested by

no test coverage detected