summaryrefslogtreecommitdiffstats
path: root/src/UI
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2014-05-08 20:16:35 +0200
committerMattes D <github@xoft.cz>2014-05-09 18:32:03 +0200
commitfb58ef55beddc73500029ae6c0fe08400de550d2 (patch)
tree8e36e0eba345faa98c499ac63f7bdeae5c02d9da /src/UI
parentInitialise m_HasTeleported in both constructors (diff)
downloadcuberite-fb58ef55beddc73500029ae6c0fe08400de550d2.tar
cuberite-fb58ef55beddc73500029ae6c0fe08400de550d2.tar.gz
cuberite-fb58ef55beddc73500029ae6c0fe08400de550d2.tar.bz2
cuberite-fb58ef55beddc73500029ae6c0fe08400de550d2.tar.lz
cuberite-fb58ef55beddc73500029ae6c0fe08400de550d2.tar.xz
cuberite-fb58ef55beddc73500029ae6c0fe08400de550d2.tar.zst
cuberite-fb58ef55beddc73500029ae6c0fe08400de550d2.zip
Diffstat (limited to 'src/UI')
-rw-r--r--src/UI/SlotArea.cpp2
-rw-r--r--src/UI/Window.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/UI/SlotArea.cpp b/src/UI/SlotArea.cpp
index 13a9f9b92..788974f9c 100644
--- a/src/UI/SlotArea.cpp
+++ b/src/UI/SlotArea.cpp
@@ -891,7 +891,7 @@ void cSlotAreaAnvil::UpdateResult(cPlayer & a_Player)
while ((DamageDiff > 0) && (x < SecondInput.m_ItemCount))
{
Input.m_ItemDamage -= DamageDiff;
- NeedExp += std::max(1, DamageDiff / 100) + Input.m_Enchantments.Count();
+ NeedExp += std::max(1, DamageDiff / 100) + (int)Input.m_Enchantments.Count();
DamageDiff = std::min((int)Input.m_ItemDamage, (int)Input.GetMaxDamage() / 4);
++x;
diff --git a/src/UI/Window.cpp b/src/UI/Window.cpp
index 4991f0147..46885390b 100644
--- a/src/UI/Window.cpp
+++ b/src/UI/Window.cpp
@@ -591,7 +591,7 @@ void cWindow::OnLeftPaintEnd(cPlayer & a_Player)
const cSlotNums & SlotNums = a_Player.GetInventoryPaintSlots();
cItem ToDistribute(a_Player.GetDraggingItem());
- int ToEachSlot = (int)ToDistribute.m_ItemCount / SlotNums.size();
+ int ToEachSlot = (int)ToDistribute.m_ItemCount / (int)SlotNums.size();
int NumDistributed = DistributeItemToSlots(a_Player, ToDistribute, ToEachSlot, SlotNums);