mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Core/PacketIO: Disable implicit bool to int conversions for ByteBuffer operators
This commit is contained in:
@@ -286,6 +286,8 @@ class TC_SHARED_API ByteBuffer
|
||||
*/
|
||||
void PutBits(std::size_t pos, std::size_t value, uint32 bitCount);
|
||||
|
||||
ByteBuffer& operator<<(bool) = delete; // prevent implicit conversions to int32
|
||||
|
||||
ByteBuffer& operator<<(char value)
|
||||
{
|
||||
append<char>(value);
|
||||
@@ -372,6 +374,8 @@ class TC_SHARED_API ByteBuffer
|
||||
return operator<<(std::string_view(str ? str : ""));
|
||||
}
|
||||
|
||||
ByteBuffer& operator>>(bool&) = delete;
|
||||
|
||||
ByteBuffer& operator>>(char& value)
|
||||
{
|
||||
read(&value, 1);
|
||||
|
||||
Reference in New Issue
Block a user