From 8464f689ea214d3c30105ae58539885cf1268317 Mon Sep 17 00:00:00 2001 From: Tycho Date: Tue, 4 Feb 2014 10:59:05 -0800 Subject: Improved Type safety of eBlockFace May Fix #640 --- src/Items/ItemFishingRod.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Items/ItemFishingRod.h') diff --git a/src/Items/ItemFishingRod.h b/src/Items/ItemFishingRod.h index b2eaee63a..15acbd9fe 100644 --- a/src/Items/ItemFishingRod.h +++ b/src/Items/ItemFishingRod.h @@ -84,7 +84,7 @@ public: { } - virtual bool OnItemUse(cWorld * a_World, cPlayer * a_Player, const cItem & a_Item, int a_BlockX, int a_BlockY, int a_BlockZ, char a_Dir) override + virtual bool OnItemUse(cWorld * a_World, cPlayer * a_Player, const cItem & a_Item, int a_BlockX, int a_BlockY, int a_BlockZ, eBlockFace a_Dir) override { if (a_Dir != BLOCK_FACE_NONE) { @@ -230,4 +230,4 @@ public: } return true; } -} ; \ No newline at end of file +} ; -- cgit v1.2.3 From 402d85d896c793644681c4bb2934a7e0abb5ed8c Mon Sep 17 00:00:00 2001 From: madmaxoft Date: Fri, 4 Apr 2014 09:56:57 +0200 Subject: Fixed Clang warnings in itemhandlers. --- src/Items/ItemFishingRod.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Items/ItemFishingRod.h') diff --git a/src/Items/ItemFishingRod.h b/src/Items/ItemFishingRod.h index 15acbd9fe..0431b88b7 100644 --- a/src/Items/ItemFishingRod.h +++ b/src/Items/ItemFishingRod.h @@ -123,7 +123,7 @@ public: } case 2: { - Drops.Add(cItem(E_ITEM_FISHING_ROD, 1, a_World->GetTickRandomNumber(50))); // Fishing rod with durability. TODO: Enchantments on it + Drops.Add(cItem(E_ITEM_FISHING_ROD, 1, (short)a_World->GetTickRandomNumber(50))); // Fishing rod with durability. TODO: Enchantments on it break; } case 3: @@ -152,7 +152,7 @@ public: } else if (Junk <= 4) { - Drops.Add(cItem(E_ITEM_BOW, 1, a_World->GetTickRandomNumber(64))); + Drops.Add(cItem(E_ITEM_BOW, 1, (short)a_World->GetTickRandomNumber(64))); } else if (Junk <= 9) { -- cgit v1.2.3