MCPcopy Create free account
hub / github.com/bytedance/sonic-cpp / setCapacity

Method setCapacity

include/sonic/dom/dynamicnode.h:589–594  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

587 }
588
589 sonic_force_inline void setCapacity(size_t new_cap) {
590 sonic_assert(this->IsContainer());
591 sonic_assert(this->o.next.children != nullptr);
592 // first node is meta node
593 ((MetaNode*)(this->o.next.children))->cap = new_cap;
594 }
595
596 sonic_force_inline void setMap(map_type* new_map) {
597 sonic_assert(this->IsObject());

Callers

nothing calls this directly

Calls 1

IsContainerMethod · 0.80

Tested by

no test coverage detected