MCPcopy Create free account
hub / github.com/TombEngine/TombEngine / ToFixedTypedVectorElementType

Function ToFixedTypedVectorElementType

Libs/flatbuffers/flexbuffers.h:117–123  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

115}
116
117inline Type ToFixedTypedVectorElementType(Type t, uint8_t *len) {
118 FLATBUFFERS_ASSERT(IsFixedTypedVector(t));
119 auto fixed_type = t - FBT_VECTOR_INT2;
120 *len = static_cast<uint8_t>(fixed_type / 3 +
121 2); // 3 types each, starting from length 2.
122 return static_cast<Type>(fixed_type % 3 + FBT_INT);
123}
124
125// TODO: implement proper support for 8/16bit floats, or decide not to
126// support them.

Callers 1

AsFixedTypedVectorMethod · 0.85

Calls 1

IsFixedTypedVectorFunction · 0.85

Tested by

no test coverage detected