From 68cced73afe546328cf94ed07c57deee47bfadec Mon Sep 17 00:00:00 2001 From: Tiger Wang Date: Sun, 20 Sep 2020 14:50:52 +0100 Subject: BlockHandler initialisation is a constant expression (#4891) * BlockHandler initialisation is a constant expression If we can't make it all namespaces, this is the next best I guess. + Tag handlers constexpr, const as needed + Inherit constructors * Privatise handler functions * More constexpr Co-authored-by: Alexander Harkness --- src/Simulator/FloodyFluidSimulator.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/Simulator/FloodyFluidSimulator.cpp') diff --git a/src/Simulator/FloodyFluidSimulator.cpp b/src/Simulator/FloodyFluidSimulator.cpp index 5f4d5ba85..ff611bbc3 100644 --- a/src/Simulator/FloodyFluidSimulator.cpp +++ b/src/Simulator/FloodyFluidSimulator.cpp @@ -299,8 +299,7 @@ void cFloodyFluidSimulator::SpreadToNeighbor(cChunk * a_NearChunk, int a_RelX, i // Wash away the block there, if possible: if (CanWashAway(BlockType)) { - cBlockHandler * Handler = BlockHandler(BlockType); - if (Handler->DoesDropOnUnsuitable()) + if (cBlockHandler::For(BlockType).DoesDropOnUnsuitable()) { m_World.DropBlockAsPickups(absPos, nullptr, nullptr); } -- cgit v1.2.3