summaryrefslogtreecommitdiffstats
path: root/src/Inventory.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Inventory.cpp')
-rw-r--r--src/Inventory.cpp6
1 files changed, 3 insertions, 3 deletions
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<char>(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<short>(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<short>(ArmorSlotNumToEntityEquipmentID(a_SlotNum)),
m_ArmorSlots.GetSlot(a_SlotNum), m_Owner.GetClientHandle()
);
}