From 9a55b1334085548701fcdcc750b633012d6ff658 Mon Sep 17 00:00:00 2001 From: Vladimir Olteanu Date: Wed, 3 Aug 2022 14:57:11 +0300 Subject: [PATCH] Avoid defensive warning in DeltaImportObjects (#5181) GCC emits -Wsequence-point even with c++20 as the language level, apparently just in case the code gets compiled under an older standard. --- Source/msg.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Source/msg.cpp b/Source/msg.cpp index 99362077c..1c2636592 100644 --- a/Source/msg.cpp +++ b/Source/msg.cpp @@ -354,7 +354,8 @@ const byte *DeltaImportObjects(const byte *src, std::unordered_map(*src++), static_cast(*src++) }; + WorldTilePosition objectPosition { static_cast(src[0]), static_cast(src[1]) }; + src += 2; dst[objectPosition] = DObjectStr { static_cast<_cmd_id>(*src++) }; }