diff options
author | Julian Laubstein <julianlaubstein@yahoo.de> | 2015-07-29 18:45:36 +0200 |
---|---|---|
committer | Julian Laubstein <julianlaubstein@yahoo.de> | 2015-07-29 18:45:36 +0200 |
commit | 735d590abf7f804a4504b70c84a289ba86c5f8e3 (patch) | |
tree | 13b603c8bbf8177da92ce87f5413fb646d204f3f /src/Inventory.cpp | |
parent | Merge pull request #2376 from mjhanninen/fix-freebsd-build (diff) | |
parent | Silenced and fixed many warning messages across multiple files. (diff) | |
download | cuberite-735d590abf7f804a4504b70c84a289ba86c5f8e3.tar cuberite-735d590abf7f804a4504b70c84a289ba86c5f8e3.tar.gz cuberite-735d590abf7f804a4504b70c84a289ba86c5f8e3.tar.bz2 cuberite-735d590abf7f804a4504b70c84a289ba86c5f8e3.tar.lz cuberite-735d590abf7f804a4504b70c84a289ba86c5f8e3.tar.xz cuberite-735d590abf7f804a4504b70c84a289ba86c5f8e3.tar.zst cuberite-735d590abf7f804a4504b70c84a289ba86c5f8e3.zip |
Diffstat (limited to 'src/Inventory.cpp')
-rw-r--r-- | src/Inventory.cpp | 6 |
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() ); } |