MCPcopy Create free account
hub / github.com/beefytech/Beef / EncodeSLEB128

Function EncodeSLEB128

BeefySysLib/util/BeefPerf.cpp:62–76  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

60BF_TLS_DECLSPEC BpThreadInfo* Beefy::BpManager::sBpThreadInfo;
61
62inline void EncodeSLEB128(uint8*& buf, int value)
63{
64 bool hasMore;
65 do
66 {
67 uint8 curByte = (uint8)(value & 0x7f);
68 value >>= 7;
69 hasMore = !((((value == 0) && ((curByte & 0x40) == 0)) ||
70 ((value == -1) && ((curByte & 0x40) != 0))));
71 if (hasMore)
72 curByte |= 0x80;
73 *(buf++) = curByte;
74 }
75 while (hasMore);
76}
77
78inline void EncodeSLEB128(uint8*& buf, int64_t value)
79{

Callers 1

ThreadProcMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected