aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorXTZGZoReX <none@none>2009-03-19 17:13:56 +0100
committerXTZGZoReX <none@none>2009-03-19 17:13:56 +0100
commit6c32bd5441ce4195eec7204dc8193a43b611a0e1 (patch)
tree7fe866027400c9b5dcca3ee315b9509f24a97a42 /src
parent4877009098c7399ee880f2374b08bf9f1c87d55d (diff)
* Fixed ByteBuffer::read<std::string> specialization. This one is correct.
--HG-- branch : trunk
Diffstat (limited to 'src')
-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