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

Function PaddingBytes

3rdparty/flatbuffers/include/flatbuffers/flatbuffers.h:540–542  ·  view source on GitHub ↗

Computes how many bytes you'd have to pad to be able to write an "scalar_size" scalar if the buffer had grown to "buf_size" (downwards in memory).

Source from the content-addressed store, hash-verified

538// "scalar_size" scalar if the buffer had grown to "buf_size" (downwards in
539// memory).
540inline size_t PaddingBytes(size_t buf_size, size_t scalar_size) {
541 return ((~buf_size) + 1) & (scalar_size - 1);
542}
543/// @endcond
544
545/// @addtogroup flatbuffers_cpp_api

Callers 2

AlignFunction · 0.85
PreAlignFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected