MCPcopy Create free account
hub / github.com/axmolengine/axmol / data

Function data

3rdparty/flatbuffers/flatbuffer_builder.h:54–59  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

52
53template<typename T, typename Alloc = std::allocator<T>>
54const T *data(const std::vector<T, Alloc> &v) {
55 // Eventually the returned pointer gets passed down to memcpy, so
56 // we need it to be non-null to avoid undefined behavior.
57 static uint8_t t;
58 return v.empty() ? reinterpret_cast<const T *>(&t) : &v.front();
59}
60template<typename T, typename Alloc = std::allocator<T>>
61T *data(std::vector<T, Alloc> &v) {
62 // Eventually the returned pointer gets passed down to memcpy, so

Callers 15

GetMutablePointerMethod · 0.70
MutateImplMethod · 0.70
CopyFromSpanImplMethod · 0.70
beginFunction · 0.70
endFunction · 0.70
operator[]Function · 0.70
MutateMethod · 0.70
MutateOffsetMethod · 0.70
beginMethod · 0.70
endMethod · 0.70
CreateVectorMethod · 0.70
CreateVector64Method · 0.70

Calls 2

emptyMethod · 0.45
frontMethod · 0.45

Tested by

no test coverage detected