MCPcopy Create free account
hub / github.com/ZDoom/Raze / WriteSLEB128

Function WriteSLEB128

source/common/scripting/jit/jit_runtime.cpp:368–390  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

366}
367
368static void WriteSLEB128(TArray<uint8_t> &stream, int32_t v)
369{
370 if (v >= 0)
371 {
372 WriteULEB128(stream, v);
373 }
374 else
375 {
376 while (true)
377 {
378 if (v > -128)
379 {
380 WriteUInt8(stream, v & 0x7f);
381 break;
382 }
383 else
384 {
385 WriteUInt8(stream, v);
386 v >>= 7;
387 }
388 }
389 }
390}
391
392static void WritePadding(TArray<uint8_t> &stream)
393{

Callers 1

WriteCIEFunction · 0.85

Calls 2

WriteULEB128Function · 0.85
WriteUInt8Function · 0.85

Tested by

no test coverage detected