mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-26 03:42:37 +01:00
Core/PacketIO: Use std::string_view to read strings from ByteBuffer
(cherry picked from commit d72e91bee2)
This commit is contained in:
@@ -49,7 +49,7 @@ public:
|
||||
class TC_SHARED_API ByteBufferInvalidValueException : public ByteBufferException
|
||||
{
|
||||
public:
|
||||
ByteBufferInvalidValueException(char const* type, char const* value);
|
||||
ByteBufferInvalidValueException(char const* type, std::string_view value);
|
||||
};
|
||||
|
||||
class TC_SHARED_API ByteBuffer
|
||||
@@ -509,9 +509,9 @@ class TC_SHARED_API ByteBuffer
|
||||
append(str, len);
|
||||
}
|
||||
|
||||
std::string ReadCString(bool requireValidUtf8 = true);
|
||||
std::string_view ReadCString(bool requireValidUtf8 = true);
|
||||
|
||||
std::string ReadString(uint32 length, bool requireValidUtf8 = true);
|
||||
std::string_view ReadString(uint32 length, bool requireValidUtf8 = true);
|
||||
|
||||
uint8* contents()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user