mirror of
https://github.com/Lime3DS/Lime3DS.git
synced 2024-11-27 12:04:16 +01:00
common, input_common, network: fix warnings
This commit is contained in:
parent
946a32d793
commit
7e134421d5
@ -170,7 +170,7 @@ static std::wstring CPToUTF16(u32 code_page, const std::string& input) {
|
||||
MultiByteToWideChar(code_page, 0, input.data(), static_cast<int>(input.size()), nullptr, 0);
|
||||
|
||||
if (size == 0) {
|
||||
return L"";
|
||||
return {};
|
||||
}
|
||||
|
||||
std::wstring output(size, L'\0');
|
||||
|
@ -1018,7 +1018,7 @@ public:
|
||||
}
|
||||
|
||||
Common::ParamPackage GetNextInput() override {
|
||||
SDL_Event event;
|
||||
SDL_Event event{};
|
||||
while (state.event_queue.Pop(event)) {
|
||||
if (event.type != SDL_JOYAXISMOTION || std::abs(event.jaxis.value / 32767.0) < 0.5) {
|
||||
continue;
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user