Commit 385f67a3 authored by nanahira's avatar nanahira

extra buffer functions

parent 67f6d60c
...@@ -12,11 +12,21 @@ public: ...@@ -12,11 +12,21 @@ public:
p += 4; p += 4;
return ret; return ret;
} }
inline static unsigned int ReadUInt32(char*& p) {
unsigned int ret = *(unsigned int*)p;
p += 4;
return ret;
}
inline static short ReadInt16(char*& p) { inline static short ReadInt16(char*& p) {
short ret = *(short*)p; short ret = *(short*)p;
p += 2; p += 2;
return ret; return ret;
} }
inline static unsigned short ReadUInt16(char*& p) {
unsigned short ret = *(unsigned short*)p;
p += 2;
return ret;
}
inline static char ReadInt8(char*& p) { inline static char ReadInt8(char*& p) {
char ret = *(char*)p; char ret = *(char*)p;
p++; p++;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment