From 1039b2829a264280493ba0fa979214fe024dc70c Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 26 Dec 2021 17:06:04 +0300 Subject: WORD -> uint16_t --- protocols/Steam/src/steam_contacts.cpp | 10 +++++----- protocols/Steam/src/steam_proto.h | 4 ++-- protocols/Steam/src/steam_utils.cpp | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) (limited to 'protocols/Steam/src') diff --git a/protocols/Steam/src/steam_contacts.cpp b/protocols/Steam/src/steam_contacts.cpp index 7f1862408a..987ad50528 100644 --- a/protocols/Steam/src/steam_contacts.cpp +++ b/protocols/Steam/src/steam_contacts.cpp @@ -6,12 +6,12 @@ void CSteamProto::SetAllContactStatuses(int status) SetContactStatus(hContact, status); } -void CSteamProto::SetContactStatus(MCONTACT hContact, WORD status) +void CSteamProto::SetContactStatus(MCONTACT hContact, uint16_t status) { if (!hContact) return; - WORD oldStatus = getWord(hContact, "Status", ID_STATUS_OFFLINE); + uint16_t oldStatus = getWord(hContact, "Status", ID_STATUS_OFFLINE); if (oldStatus == status) return; @@ -152,10 +152,10 @@ void CSteamProto::UpdateContactDetails(MCONTACT hContact, const JSONNode &data) // status // note: this here is often wrong info, probably depending on publicity of steam profile // but sometimes polling does not get status at all - WORD oldStatus = getWord(hContact, "Status", ID_STATUS_OFFLINE); + uint16_t oldStatus = getWord(hContact, "Status", ID_STATUS_OFFLINE); // so, set status only if contact is offline if (oldStatus == ID_STATUS_OFFLINE) { - WORD status = SteamToMirandaStatus((PersonaState)data["personastate"].as_int()); + uint16_t status = SteamToMirandaStatus((PersonaState)data["personastate"].as_int()); SetContactStatus(hContact, status); } @@ -165,7 +165,7 @@ void CSteamProto::UpdateContactDetails(MCONTACT hContact, const JSONNode &data) if (stateflags == PersonaStateFlag::None) { // nothing special, either standard client or in different status (only online, I want to play, I want to trade statuses support this flags) - WORD status = getWord(hContact, "Status", ID_STATUS_OFFLINE); + uint16_t status = getWord(hContact, "Status", ID_STATUS_OFFLINE); if (status == ID_STATUS_ONLINE || status == ID_STATUS_FREECHAT) setWString(hContact, "MirVer", L"Steam"); } diff --git a/protocols/Steam/src/steam_proto.h b/protocols/Steam/src/steam_proto.h index 8e4596c8ae..4c72b97c57 100644 --- a/protocols/Steam/src/steam_proto.h +++ b/protocols/Steam/src/steam_proto.h @@ -153,7 +153,7 @@ protected: // contacts void SetAllContactStatuses(int status); - void SetContactStatus(MCONTACT hContact, WORD status); + void SetContactStatus(MCONTACT hContact, uint16_t status); MCONTACT GetContactFromAuthEvent(MEVENT hEvent); @@ -239,7 +239,7 @@ protected: INT_PTR __cdecl OnAccountManagerInit(WPARAM wParam, LPARAM lParam); // utils - static WORD SteamToMirandaStatus(PersonaState state); + static uint16_t SteamToMirandaStatus(PersonaState state); static PersonaState MirandaToSteamState(int status); static int RsaEncrypt(const char *pszModulus, DWORD &exponent, const char *data, uint8_t *encrypted, DWORD &encryptedSize); diff --git a/protocols/Steam/src/steam_utils.cpp b/protocols/Steam/src/steam_utils.cpp index ad6b8b3732..7322aaf092 100644 --- a/protocols/Steam/src/steam_utils.cpp +++ b/protocols/Steam/src/steam_utils.cpp @@ -1,6 +1,6 @@ #include "stdafx.h" -WORD CSteamProto::SteamToMirandaStatus(PersonaState state) +uint16_t CSteamProto::SteamToMirandaStatus(PersonaState state) { switch (state) { case PersonaState::Offline: -- cgit v1.2.3