MCPcopy Create free account
hub / github.com/USCiLab/cereal / Resize

Method Resize

include/cereal/external/rapidjson/internal/stack.h:201–206  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

199 }
200
201 void Resize(size_t newCapacity) {
202 const size_t size = GetSize(); // Backup the current size
203 stack_ = static_cast<char*>(allocator_->Realloc(stack_, GetCapacity(), newCapacity));
204 stackTop_ = stack_ + size;
205 stackEnd_ = stack_ + newCapacity;
206 }
207
208 void Destroy() {
209 Allocator::Free(stack_);

Callers

nothing calls this directly

Calls 2

GetSizeFunction · 0.50
ReallocMethod · 0.45

Tested by

no test coverage detected