From 804805d35a87c2acc9425d1762ad26b1ba2ec9ac Mon Sep 17 00:00:00 2001 From: Samuel Barney Date: Wed, 29 Jul 2015 09:04:03 -0600 Subject: Silenced and fixed many warning messages across multiple files. --- src/Inventory.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/Inventory.cpp') diff --git a/src/Inventory.cpp b/src/Inventory.cpp index 455a4bbe5..14b7202c7 100644 --- a/src/Inventory.cpp +++ b/src/Inventory.cpp @@ -138,7 +138,7 @@ int cInventory::AddItem(const cItem & a_Item, bool a_AllowNewStacks) } res += m_HotbarSlots.AddItem(ToAdd, a_AllowNewStacks); - ToAdd.m_ItemCount = a_Item.m_ItemCount - res; + ToAdd.m_ItemCount = static_cast(a_Item.m_ItemCount - res); if (ToAdd.m_ItemCount == 0) { return res; @@ -459,7 +459,7 @@ void cInventory::SendSlot(int a_SlotNum) // Sanitize items that are not completely empty (ie. count == 0, but type != empty) Item.Empty(); } - m_Owner.GetClientHandle()->SendInventorySlot(0, a_SlotNum + 5, Item); // Slots in the client are numbered "+ 5" because of crafting grid and result + m_Owner.GetClientHandle()->SendInventorySlot(0, static_cast(a_SlotNum + 5), Item); // Slots in the client are numbered "+ 5" because of crafting grid and result } @@ -724,7 +724,7 @@ void cInventory::OnSlotChanged(cItemGrid * a_ItemGrid, int a_SlotNum) if ((a_ItemGrid == &m_ArmorSlots) && (World != nullptr)) { World->BroadcastEntityEquipment( - m_Owner, ArmorSlotNumToEntityEquipmentID(a_SlotNum), + m_Owner, static_cast(ArmorSlotNumToEntityEquipmentID(a_SlotNum)), m_ArmorSlots.GetSlot(a_SlotNum), m_Owner.GetClientHandle() ); } -- cgit v1.2.3