MCPcopy Create free account
hub / github.com/StereoKit/StereoKit / text_buffer_ensure_capacity

Function text_buffer_ensure_capacity

StereoKitC/systems/text.cpp:74–81  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

72//////////////////////////////////////////
73
74void text_buffer_ensure_capacity(text_buffer_t &buffer, size_t characters) {
75 if (buffer.vert_count + (int32_t)characters*4 <= buffer.vert_cap)
76 return;
77
78 buffer.vert_cap = maxi(buffer.vert_count + (int)characters * 4, buffer.vert_cap * 2);
79 buffer.verts = sk_realloc_t(vert_t, buffer.verts, buffer.vert_cap);
80 buffer.dirty_inds = true;
81}
82
83//////////////////////////////////////////
84

Callers 1

text_add_in_gFunction · 0.85

Calls 1

maxiFunction · 0.85

Tested by

no test coverage detected