diff --git a/source/lib/types.h b/source/lib/types.h index db36ed2abf..3ca43a542d 100644 --- a/source/lib/types.h +++ b/source/lib/types.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2025 Wildfire Games. +/* Copyright (C) 2026 Wildfire Games. * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the @@ -29,7 +29,6 @@ #include -typedef int8_t i8; typedef int16_t i16; typedef int32_t i32; typedef int64_t i64; diff --git a/source/network/NetFileTransfer.cpp b/source/network/NetFileTransfer.cpp index 0e3e49de74..e984b1f078 100644 --- a/source/network/NetFileTransfer.cpp +++ b/source/network/NetFileTransfer.cpp @@ -156,7 +156,7 @@ void CNetFileTransferer::StartTask(RequestType requestType, std::function(requestType); + request.m_RequestType = static_cast(requestType); request.m_RequestID = requestID; m_SendMessage(&request); } diff --git a/source/network/NetMessages.h b/source/network/NetMessages.h index 88c9292307..b3d6ac9ba1 100644 --- a/source/network/NetMessages.h +++ b/source/network/NetMessages.h @@ -162,13 +162,13 @@ START_NMT_CLASS_(PlayerAssignment, NMT_PLAYER_ASSIGNMENT) NMT_START_ARRAY(m_Hosts) NMT_FIELD(CStr, m_GUID) NMT_FIELD(CStrW, m_Name) - NMT_FIELD_INT(m_PlayerID, i8, 1) + NMT_FIELD_INT(m_PlayerID, std::int8_t, 1) NMT_FIELD_INT(m_Status, u8, 1) NMT_END_ARRAY() END_NMT_CLASS() START_NMT_CLASS_(FileTransferRequest, NMT_FILE_TRANSFER_REQUEST) - NMT_FIELD_INT(m_RequestType, i8, 1) + NMT_FIELD_INT(m_RequestType, std::int8_t, 1) NMT_FIELD_INT(m_RequestID, u32, 4) END_NMT_CLASS() @@ -261,7 +261,7 @@ START_NMT_CLASS_(SyncError, NMT_SYNC_ERROR) END_NMT_CLASS() START_NMT_CLASS_(AssignPlayer, NMT_ASSIGN_PLAYER) - NMT_FIELD_INT(m_PlayerID, i8, 1) + NMT_FIELD_INT(m_PlayerID, std::int8_t, 1) NMT_FIELD(CStr, m_GUID) END_NMT_CLASS() diff --git a/source/simulation2/components/CCmpRangeManager.cpp b/source/simulation2/components/CCmpRangeManager.cpp index 68ab548e2b..8841ffbfe6 100644 --- a/source/simulation2/components/CCmpRangeManager.cpp +++ b/source/simulation2/components/CCmpRangeManager.cpp @@ -265,7 +265,7 @@ struct EntityData u32 visibilities; // 2-bit visibility, per player u32 size; u16 visionSharing; // 1-bit per player - i8 owner; + std::int8_t owner; u8 flags; // See the FlagMasks enum template @@ -730,7 +730,7 @@ public: } ENSURE(-128 <= msgData.to && msgData.to <= 127); - it->second.owner = (i8)msgData.to; + it->second.owner = static_cast(msgData.to); break; } @@ -816,7 +816,7 @@ public: if (!it->second.HasFlag()) { // Activation of the Vision Sharing - ENSURE(it->second.owner == (i8)msgData.player); + ENSURE(it->second.owner == static_cast(msgData.player)); it->second.visionSharing = visionChanged; it->second.SetFlag(true); break;