From 6c32bd5441ce4195eec7204dc8193a43b611a0e1 Mon Sep 17 00:00:00 2001 From: XTZGZoReX Date: Thu, 19 Mar 2009 17:13:56 +0100 Subject: * Fixed ByteBuffer::read specialization. This one is correct. --HG-- branch : trunk --- src/shared/ByteBuffer.h | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'src/shared/ByteBuffer.h') 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 -- cgit v1.2.3