mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-29 13:22:48 +01:00
* 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);
|
||||
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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user