diff --git a/src/shared/ByteBuffer.h b/src/shared/ByteBuffer.h index dc90e38e14f..b61cefb1a05 100644 --- a/src/shared/ByteBuffer.h +++ b/src/shared/ByteBuffer.h @@ -228,12 +228,6 @@ class ByteBuffer _rpos += sizeof(T); return r; }; - /*template<> std::string read() - { - std::string tmp; - *this >> tmp; - return tmp; - }*/ template T read(size_t pos) const { ASSERT(pos + sizeof(T) <= size() || PrintPosError(false,pos,sizeof(T))); @@ -510,5 +504,13 @@ template ByteBuffer &operator>>(ByteBuffer &b, std::map } return b; } + +// TODO: Make a ByteBuffer.cpp and move all this inlining to it. +template<> inline std::string ByteBuffer::read() +{ + std::string tmp; + *this >> tmp; + return tmp; +} #endif