* Added specialized ByteBuffer::read for std::string. This will aid in packet processing later.

--HG--
branch : trunk
This commit is contained in:
XTZGZoReX
2009-03-18 21:34:59 +01:00
parent 103125cfbd
commit d84cec89c0
+6
View File
@@ -228,6 +228,12 @@ class ByteBuffer
_rpos += sizeof(T);
return r;
};
template<> std::string read<std::string>()
{
std::string tmp;
*this >> tmp;
return tmp;
}
template <typename T> T read(size_t pos) const
{
ASSERT(pos + sizeof(T) <= size() || PrintPosError(false,pos,sizeof(T)));