MCPcopy Create free account
hub / github.com/assimp/assimp / Grow

Method Grow

code/AssetLib/Assbin/AssbinFileWriter.cpp:299–311  ·  view source on GitHub ↗

-------------------------------------------------------------------

Source from the content-addressed store, hash-verified

297private:
298 // -------------------------------------------------------------------
299 void Grow(size_t need = 0) {
300 size_t new_size = std::max(initial, std::max(need, cur_size + (cur_size >> 1)));
301
302 const uint8_t *const old = buffer;
303 buffer = new uint8_t[new_size];
304
305 if (old) {
306 memcpy(buffer, old, cur_size);
307 delete[] old;
308 }
309
310 cur_size = new_size;
311 }
312
313private:
314 uint8_t *buffer;

Callers 3

ExportDataFunction · 0.45
ExportDataSparseFunction · 0.45
ExportDataFunction · 0.45

Calls 1

maxFunction · 0.50

Tested by

no test coverage detected