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 <me@bearbin.net>
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user