MCPcopy Create free account
hub / github.com/bytedance/Fastbot_Android / PreAlign

Function PreAlign

native/thirdpart/flatbuffers/flatbuffers.h:1532–1535  ·  view source on GitHub ↗

Aligns such that when "len" bytes are written, an object can be written after it with "alignment" without padding.

Source from the content-addressed store, hash-verified

1530 // Aligns such that when "len" bytes are written, an object can be written
1531 // after it with "alignment" without padding.
1532 void PreAlign(size_t len, size_t alignment) {
1533 TrackMinAlign(alignment);
1534 buf_.fill(PaddingBytes(GetSize() + len, alignment));
1535 }
1536 template<typename T> void PreAlign(size_t len) {
1537 AssertScalarT<T>();
1538 PreAlign(len, sizeof(T));

Callers 4

StartVectorFunction · 0.85
ForceVectorAlignmentFunction · 0.85
ForceStringAlignmentFunction · 0.85
FinishFunction · 0.85

Calls 3

TrackMinAlignFunction · 0.85
PaddingBytesFunction · 0.85
GetSizeFunction · 0.70

Tested by

no test coverage detected