MCPcopy Create free account
hub / github.com/Niko1221/Strata / get_vec

Method get_vec

engine/src/split/src/model.cpp:1641–1648  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1639 s.append((const char*) v.data(), v.size() * sizeof(T));
1640 }
1641 template <typename T> void get_vec(std::vector<T>& v) {
1642 uint64_t n = 0;
1643 get(n);
1644 if (at + n * sizeof(T) > s.size()) throw std::runtime_error("fnx: the holder's image is short");
1645 v.resize(n);
1646 std::memcpy((void*) v.data(), s.data() + at, n * sizeof(T));
1647 at += n * sizeof(T);
1648 }
1649};
1650template <typename F>
1651void card_fields(CardW& c, F f) {

Callers 1

restoreMethod · 0.80

Calls 5

memcpyFunction · 0.85
getFunction · 0.50
sizeMethod · 0.45
resizeMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected