MCPcopy Create free account
hub / github.com/IntegralPilot/wasm_os / grow_capacity

Method grow_capacity

stdlib/cpp/vector.hpp:24–27  ·  view source on GitHub ↗

Helper function for geometric growth

Source from the content-addressed store, hash-verified

22
23 // Helper function for geometric growth
24 void grow_capacity() {
25 size_type new_capacity = capacity_ == 0 ? 1 : capacity_ * 2;
26 reserve(new_capacity);
27 }
28
29public:
30 // Constructors

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected