* Fixed ByteBuffer::read<std::string> specialization. This one is correct.
--HG-- branch : trunk
This commit is contained in:
@@ -228,12 +228,6 @@ class ByteBuffer
|
|||||||
_rpos += sizeof(T);
|
_rpos += sizeof(T);
|
||||||
return r;
|
return r;
|
||||||
};
|
};
|
||||||
/*template<> std::string read<std::string>()
|
|
||||||
{
|
|
||||||
std::string tmp;
|
|
||||||
*this >> tmp;
|
|
||||||
return tmp;
|
|
||||||
}*/
|
|
||||||
template <typename T> T read(size_t pos) const
|
template <typename T> T read(size_t pos) const
|
||||||
{
|
{
|
||||||
ASSERT(pos + sizeof(T) <= size() || PrintPosError(false,pos,sizeof(T)));
|
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;
|
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
|
#endif
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user