common, input_common, network: fix warnings

This commit is contained in:
SachinVin 2023-06-09 22:50:37 +05:30
parent 946a32d793
commit 7e134421d5
3 changed files with 8 additions and 8 deletions

View file

@ -85,42 +85,42 @@ Packet& Packet::operator>>(u8& out_data) {
}
Packet& Packet::operator>>(s16& out_data) {
s16 value;
s16 value = 0;
Read(&value, sizeof(value));
out_data = ntohs(value);
return *this;
}
Packet& Packet::operator>>(u16& out_data) {
u16 value;
u16 value = 0;
Read(&value, sizeof(value));
out_data = ntohs(value);
return *this;
}
Packet& Packet::operator>>(s32& out_data) {
s32 value;
s32 value = 0;
Read(&value, sizeof(value));
out_data = ntohl(value);
return *this;
}
Packet& Packet::operator>>(u32& out_data) {
u32 value;
u32 value = 0;
Read(&value, sizeof(value));
out_data = ntohl(value);
return *this;
}
Packet& Packet::operator>>(s64& out_data) {
s64 value;
s64 value = 0;
Read(&value, sizeof(value));
out_data = ntohll(value);
return *this;
}
Packet& Packet::operator>>(u64& out_data) {
u64 value;
u64 value = 0;
Read(&value, sizeof(value));
out_data = ntohll(value);
return *this;