From c747b4911ed4b1833d7f400d62d1835aba704278 Mon Sep 17 00:00:00 2001 From: Tiger Wang Date: Wed, 22 Mar 2023 10:20:16 +0000 Subject: Removed C style arrays from the BlockEntity folder (#5005) * Removed C style arrays from the BlockEntity folder * Update for loops with size_t where there are no item grids involved * Fixed some casts in BrewingstandEntity.cpp --------- Co-authored-by: bibo38 Co-authored-by: x12xx12x <44411062+12xx12@users.noreply.github.com> --- src/BlockEntities/BrewingstandEntity.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/BlockEntities/BrewingstandEntity.h') diff --git a/src/BlockEntities/BrewingstandEntity.h b/src/BlockEntities/BrewingstandEntity.h index 67a6da1a3..66eaa920d 100644 --- a/src/BlockEntities/BrewingstandEntity.h +++ b/src/BlockEntities/BrewingstandEntity.h @@ -78,7 +78,7 @@ public: const cItem & GetFuelSlot(void) const { return GetSlot(bsFuel); } /** Get the expected result item for the given slot number */ - const cItem & GetResultItem(int a_SlotNumber) { return m_Results[a_SlotNumber]; } + const cItem & GetResultItem(size_t a_SlotNumber) { return m_Results[a_SlotNumber]; } /** Sets the item in the left bottle slot */ void SetLeftBottleSlot(const cItem & a_Item) { SetSlot(bsLeftBottle, a_Item); } @@ -118,10 +118,10 @@ protected: const short m_NeedBrewingTime = 400; /** Store the current brewing recipes */ - const cBrewingRecipes::cRecipe * m_CurrentBrewingRecipes[3] = {}; + std::array m_CurrentBrewingRecipes = {}; /** Result items for the bottle inputs */ - cItem m_Results[3]; + std::array m_Results; /** Amount of ticks that the current item has been brewed */ short m_TimeBrewed; -- cgit v1.2.3