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

Function PreAlign

3rdparty/flatbuffers/include/flatbuffers/flatbuffers.h:817–819  ·  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

815 // Aligns such that when "len" bytes are written, an object can be written
816 // after it with "alignment" without padding.
817 void PreAlign(size_t len, size_t alignment) {
818 buf_.fill(PaddingBytes(GetSize() + len, alignment));
819 }
820 template<typename T> void PreAlign(size_t len) {
821 AssertScalarT<T>();
822 PreAlign(len, sizeof(T));

Callers 3

StartVectorFunction · 0.85
ForceVectorAlignmentFunction · 0.85
FinishFunction · 0.85

Calls 3

PaddingBytesFunction · 0.85
GetSizeFunction · 0.85
fillMethod · 0.80

Tested by

no test coverage detected