From ae6b3e38a0c1cd15579322ff152409f9eac07fab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nuno=20Gon=C3=A7alves?= Date: Fri, 7 Apr 2017 02:46:08 +0200 Subject: [PATCH] Changed: rollback fixes of Strict aliasing warnings --HG-- branch : item_group --- code/ryzom/common/src/game_share/inventories.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/code/ryzom/common/src/game_share/inventories.h b/code/ryzom/common/src/game_share/inventories.h index a9f9161e1..83230fc41 100644 --- a/code/ryzom/common/src/game_share/inventories.h +++ b/code/ryzom/common/src/game_share/inventories.h @@ -425,13 +425,17 @@ private: struct COneProp { - TItemPropId ItemPropId; + union + { + TItemPropId ItemPropId; + uint32 ItemPropIdUint32; + }; sint32 ItemPropValue; void serial( NLMISC::CBitMemStream& bms ) { - bms.serial( (uint32&)ItemPropId, NbBitsForItemPropId ); - bms.serial( (uint32&)ItemPropValue, CItemSlot::DataBitSize[ItemPropId] ); + bms.serial((uint32&)ItemPropIdUint32, NbBitsForItemPropId); + bms.serial((uint32&)ItemPropValue, CItemSlot::DataBitSize[ItemPropId]); } };