MCPcopy Create free account
hub / github.com/ElementsProject/elements / resize_uninitialized

Method resize_uninitialized

src/test/fuzz/prevector.cpp:184–202  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

182 }
183
184 void resize_uninitialized(realtype values)
185 {
186 size_t r = values.size();
187 size_t s = real_vector.size() / 2;
188 if (real_vector.capacity() < s + r) {
189 real_vector.reserve(s + r);
190 }
191 real_vector.resize(s);
192 pre_vector.resize_uninitialized(s);
193 for (auto v : values) {
194 real_vector.push_back(v);
195 }
196 auto p = pre_vector.size();
197 pre_vector.resize_uninitialized(p + r);
198 for (auto v : values) {
199 pre_vector[p] = v;
200 ++p;
201 }
202 }
203};
204
205} // namespace

Callers 1

FUZZ_TARGETFunction · 0.45

Calls 5

sizeMethod · 0.45
capacityMethod · 0.45
reserveMethod · 0.45
resizeMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected