1
0

ByteBuffer: Writing a string doesn't modify it (missing const).

This commit is contained in:
madmaxoft 2013-10-31 23:47:22 +01:00
parent feaea31b78
commit 080ee3b2a1
2 changed files with 3 additions and 3 deletions

View File

@ -555,7 +555,7 @@ bool cByteBuffer::WriteVarInt(UInt32 a_Value)
bool cByteBuffer::WriteVarUTF8String(AString & a_Value)
bool cByteBuffer::WriteVarUTF8String(const AString & a_Value)
{
CHECK_THREAD;
CheckValid();

View File

@ -62,7 +62,7 @@ public:
bool ReadVarUTF8String (AString & a_Value); // string length as VarInt, then string as UTF-8
/// Reads VarInt, assigns it to anything that can be assigned from an UInt32 (unsigned short, char, Byte, double, ...)
template <typename T> bool ReadVarUInt(T & a_Value)
template <typename T> bool ReadVarInt(T & a_Value)
{
UInt32 v;
bool res = ReadVarInt(v);
@ -84,7 +84,7 @@ public:
bool WriteBool (bool a_Value);
bool WriteBEUTF16String16(const AString & a_Value); // string length as BE short, then string as UTF-16BE
bool WriteVarInt (UInt32 a_Value);
bool WriteVarUTF8String (AString & a_Value); // string length as VarInt, then string as UTF-8
bool WriteVarUTF8String (const AString & a_Value); // string length as VarInt, then string as UTF-8
/// Reads a_Count bytes into a_Buffer; returns true if successful
bool ReadBuf(void * a_Buffer, int a_Count);