mirror of
https://github.com/mangosfour/server.git
synced 2025-12-28 04:37:04 +00:00
Merge commit 'origin/master' into 320
This commit is contained in:
commit
373a837aa5
17 changed files with 156 additions and 123 deletions
|
|
@ -259,6 +259,32 @@ class ByteBuffer
|
|||
return _wpos;
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
void read_skip() { read_skip(sizeof(T)); }
|
||||
|
||||
template<typename T1, typename T2>
|
||||
void read_skip2() { read_skip(sizeof(T1)+sizeof(T2)); }
|
||||
|
||||
template<>
|
||||
void read_skip<char*>()
|
||||
{
|
||||
uint8 size = read<uint8>();
|
||||
read_skip(size);
|
||||
}
|
||||
|
||||
template<>
|
||||
void read_skip<char const*>() { read_skip<char*>(); }
|
||||
|
||||
template<>
|
||||
void read_skip<std::string>() { read_skip<char*>(); }
|
||||
|
||||
void read_skip(size_t skip)
|
||||
{
|
||||
if(_rpos + skip > size())
|
||||
throw ByteBufferException(false, _rpos, skip, size());
|
||||
_rpos += skip;
|
||||
}
|
||||
|
||||
template <typename T> T read()
|
||||
{
|
||||
T r = read<T>(_rpos);
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "8379"
|
||||
#define REVISION_NR "8383"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue