diff options
| author | qwasdrizzel <145519042+qwasdrizzel@users.noreply.github.com> | 2026-03-16 21:44:26 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-03-16 21:44:26 -0500 |
| commit | ce739f6045ec72127491286ea3f3f21e537c1b55 (patch) | |
| tree | f33bd42a47c1b4a7b2153a7fb77127ee3b407db9 /Minecraft.World/ChatPacket.cpp | |
| parent | 255a18fe8e9b57377975f82e2b227afe2a12eda0 (diff) | |
| parent | 5a59f5d146b43811dde6a5a0245ee9875d7b5cd1 (diff) | |
Merge branch 'smartcmd:main' into main
Diffstat (limited to 'Minecraft.World/ChatPacket.cpp')
| -rw-r--r-- | Minecraft.World/ChatPacket.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Minecraft.World/ChatPacket.cpp b/Minecraft.World/ChatPacket.cpp index 2988962e..c4a3ca7c 100644 --- a/Minecraft.World/ChatPacket.cpp +++ b/Minecraft.World/ChatPacket.cpp @@ -43,7 +43,7 @@ ChatPacket::ChatPacket(const wstring& message, EChatPacketMessage type, int sour // Read chat packet (throws IOException) void ChatPacket::read(DataInputStream *dis) { - m_messageType = (EChatPacketMessage) dis->readShort(); + m_messageType = static_cast<EChatPacketMessage>(dis->readShort()); short packedCounts = dis->readShort(); int stringCount = (packedCounts >> 4) & 0xF; @@ -71,12 +71,12 @@ void ChatPacket::write(DataOutputStream *dos) dos->writeShort(packedCounts); - for(int i = 0; i < m_stringArgs.size(); i++) + for(size_t i = 0; i < m_stringArgs.size(); i++) { writeUtf(m_stringArgs[i], dos); } - for(int i = 0; i < m_intArgs.size(); i++) + for(size_t i = 0; i < m_intArgs.size(); i++) { dos->writeInt(m_intArgs[i]); } @@ -92,7 +92,7 @@ void ChatPacket::handle(PacketListener *listener) int ChatPacket::getEstimatedSize() { int stringsSize = 0; - for(int i = 0; i < m_stringArgs.size(); i++) + for(size_t i = 0; i < m_stringArgs.size(); i++) { stringsSize += m_stringArgs[i].length(); } |
