MCPcopy Create free account
hub / github.com/assaultcube/AC / getuint

Function getuint

source/src/protocol.cpp:92–104  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

90void putuint(vector<uchar> &p, int n) { putuint_(p, n); }
91
92int getuint(ucharbuf &p)
93{
94 int n = p.get();
95 if(n & 0x80)
96 {
97 n += (p.get() << 7) - 0x80;
98 if(n & (1<<14)) n += (p.get() << 14) - (1<<14);
99 if(n & (1<<21)) n += (p.get() << 21) - (1<<21);
100 if(n & (1<<28)) n |= 0xF0000000;
101 }
102 DEBUGVAR(n);
103 return n;
104}
105
106template<class T>
107static inline void putfloat_(T &p, float f)

Callers 8

loadMethod · 0.85
parsepositionsFunction · 0.85
parsemessagesFunction · 0.85
getgzbufFunction · 0.85
processFunction · 0.85
unpackheaderextraFunction · 0.85
modeinfoFunction · 0.85
restoreeditundoFunction · 0.85

Calls 1

getMethod · 0.45

Tested by

no test coverage detected