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

Method resize

stdlib/cpp/vector.hpp:147–162  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

145 }
146
147 void resize(size_type count) {
148 if (count < size_) {
149 for (size_type i = count; i < size_; ++i) {
150 data_[i].~T();
151 }
152 size_ = count;
153 } else if (count > size_) {
154 if (count > capacity_) {
155 reserve(count);
156 }
157 for (size_type i = size_; i < count; ++i) {
158 new (&data_[i]) T();
159 }
160 size_ = count;
161 }
162 }
163
164 // Modifiers
165 void push_back(const T& value) {

Callers 1

mainFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected