16 static const size_t extra_size = 50;
23 set_used_length(
size_t size) {
24 if (size > _allocated_size) {
25 _allocated_size = size + size + extra_size;
26 char *new_buf =
new char[_allocated_size];
27 if (_used_length > 0) {
28 memcpy(new_buf, _buffer, _used_length);
30 if (_buffer !=
nullptr) {
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.