MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / SlGetGammaLength

Function SlGetGammaLength

src/saveload/saveload.cpp:537–540  ·  view source on GitHub ↗

Return how many bytes used to encode a gamma value */

Source from the content-addressed store, hash-verified

535
536/** Return how many bytes used to encode a gamma value */
537static inline uint SlGetGammaLength(size_t i)
538{
539 return 1 + (i >= (1 << 7)) + (i >= (1 << 14)) + (i >= (1 << 21)) + (i >= (1 << 28));
540}
541
542static inline uint SlReadSparseIndex()
543{

Callers 1

SlGetArrayLengthFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected