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

Function PreAlign

Libs/flatbuffers/flatbuffers.h:1606–1609  ·  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

1604 // Aligns such that when "len" bytes are written, an object can be written
1605 // after it with "alignment" without padding.
1606 void PreAlign(size_t len, size_t alignment) {
1607 TrackMinAlign(alignment);
1608 buf_.fill(PaddingBytes(GetSize() + len, alignment));
1609 }
1610 template<typename T> void PreAlign(size_t len) {
1611 AssertScalarT<T>();
1612 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