| 90 | void putuint(vector<uchar> &p, int n) { putuint_(p, n); } |
| 91 | |
| 92 | int 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 | |
| 106 | template<class T> |
| 107 | static inline void putfloat_(T &p, float f) |
no test coverage detected