aboutsummaryrefslogtreecommitdiff
path: root/src/shared/ByteBuffer.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/shared/ByteBuffer.h')
-rw-r--r--src/shared/ByteBuffer.h14
1 files changed, 8 insertions, 6 deletions
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>()
- {
- 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)));
@@ -510,5 +504,13 @@ template <typename K, typename V> 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>()
+{
+ std::string tmp;
+ *this >> tmp;
+ return tmp;
+}
#endif