From 7c07083724980af73f299c079f9040166120b1e4 Mon Sep 17 00:00:00 2001 From: Stan Date: Wed, 31 May 2023 12:03:04 +0000 Subject: [PATCH] Fix the removal of implicit conversions in libfmt 10 by using explicit casts. Patch by: @phosit Accepted by: @vladislavbelov Comments by: @sera Differential Revision: https://code.wildfiregames.com/D4998 This was SVN commit r27657. --- source/network/NetMessage.cpp | 5 +++-- source/simulation2/serialization/BinarySerializer.cpp | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/source/network/NetMessage.cpp b/source/network/NetMessage.cpp index 61126d8e1b..9515d939de 100644 --- a/source/network/NetMessage.cpp +++ b/source/network/NetMessage.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2017 Wildfire Games. +/* Copyright (C) 2023 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -216,7 +216,8 @@ CNetMessage* CNetMessageFactory::CreateMessage(const void* pData, break; default: - LOGERROR("CNetMessageFactory::CreateMessage(): Unknown message type '%d' received", header.GetType()); + LOGERROR("CNetMessageFactory::CreateMessage(): Unknown message type '%d' received", + static_cast(header.GetType())); break; } diff --git a/source/simulation2/serialization/BinarySerializer.cpp b/source/simulation2/serialization/BinarySerializer.cpp index c24b84bb2c..4a6b57d7a9 100644 --- a/source/simulation2/serialization/BinarySerializer.cpp +++ b/source/simulation2/serialization/BinarySerializer.cpp @@ -52,7 +52,7 @@ static u8 GetArrayType(js::Scalar::Type arrayType) case js::Scalar::Uint8Clamped: return SCRIPT_TYPED_ARRAY_UINT8_CLAMPED; default: - LOGERROR("Cannot serialize unrecognized typed array view: %d", arrayType); + LOGERROR("Cannot serialize unrecognized typed array view: %d", static_cast(arrayType)); throw PSERROR_Serialize_InvalidScriptValue(); } }