From 090d8305e4e3c3ee085a897b72f2b4708e183eb8 Mon Sep 17 00:00:00 2001 From: Tiger Wang Date: Mon, 5 Oct 2020 13:09:42 +0100 Subject: Warnings improvements * Turn off global-constructors warning. These are needed to implement cRoot signal handler functionality * Add Clang flags based on version lookup instead of a compile test. The CMake config process is single threaded and slow enough already * Reduced GetStackValue verbosity + Clarify EnchantmentLevel, StayCount, AlwaysTicked, ViewDistance signedness + Give SettingsRepositoryInterface a move constructor to simplify main.cpp code - Remove do {} while (false) construction in redstone handler --- src/Items/ItemFishingRod.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Items') diff --git a/src/Items/ItemFishingRod.h b/src/Items/ItemFishingRod.h index 85688c5c1..ec59763ed 100644 --- a/src/Items/ItemFishingRod.h +++ b/src/Items/ItemFishingRod.h @@ -175,7 +175,7 @@ public: case 0: { cItem Bow(E_ITEM_BOW, 1, Random.RandInt(50)); - Bow.EnchantByXPLevels(Random.RandInt(22, 30), GetRandomProvider()); + Bow.EnchantByXPLevels(Random.RandInt(22U, 30U), GetRandomProvider()); Drops.Add(Bow); break; } @@ -189,7 +189,7 @@ public: case 2: { cItem Rod(E_ITEM_FISHING_ROD, 1, Random.RandInt(50)); - Rod.EnchantByXPLevels(Random.RandInt(22, 30), GetRandomProvider()); + Rod.EnchantByXPLevels(Random.RandInt(22U, 30U), GetRandomProvider()); Drops.Add(Rod); break; } -- cgit v1.2.3