diff options
author | Mattes D <github@xoft.cz> | 2014-10-23 08:29:31 +0200 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2014-10-23 08:29:31 +0200 |
commit | 4bfd2c9707f2c8484587f061393e8f9346d60fef (patch) | |
tree | 4b7bea204c0ddd18bb4f95357f9eb77590bc2e8d /src/Blocks/BlockHandler.cpp | |
parent | ComposableGenerator: Removed nullptr initializers. (diff) | |
parent | En masse NULL -> nullptr replace (diff) | |
download | cuberite-4bfd2c9707f2c8484587f061393e8f9346d60fef.tar cuberite-4bfd2c9707f2c8484587f061393e8f9346d60fef.tar.gz cuberite-4bfd2c9707f2c8484587f061393e8f9346d60fef.tar.bz2 cuberite-4bfd2c9707f2c8484587f061393e8f9346d60fef.tar.lz cuberite-4bfd2c9707f2c8484587f061393e8f9346d60fef.tar.xz cuberite-4bfd2c9707f2c8484587f061393e8f9346d60fef.tar.zst cuberite-4bfd2c9707f2c8484587f061393e8f9346d60fef.zip |
Diffstat (limited to 'src/Blocks/BlockHandler.cpp')
-rw-r--r-- | src/Blocks/BlockHandler.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Blocks/BlockHandler.cpp b/src/Blocks/BlockHandler.cpp index b6ef5dd6f..60f13a747 100644 --- a/src/Blocks/BlockHandler.cpp +++ b/src/Blocks/BlockHandler.cpp @@ -99,9 +99,9 @@ public: for (BLOCKTYPE Type = 0; Type < E_BLOCK_MAX_TYPE_ID; Type++) { cBlockHandler * Handler = cBlockInfo::GetHandler(Type); - if (Handler == NULL) + if (Handler == nullptr) { - printf("NULL handler for block type %d!\n", Type); + printf("nullptr handler for block type %d!\n", Type); continue; } AString BlockName = ItemTypeToString(Type); @@ -441,7 +441,7 @@ void cBlockHandler::DropBlock(cChunkInterface & a_ChunkInterface, cWorldInterfac if (a_CanDrop) { - if ((a_Digger != NULL) && (a_Digger->GetEquippedWeapon().m_Enchantments.GetLevel(cEnchantments::enchSilkTouch) > 0)) + if ((a_Digger != nullptr) && (a_Digger->GetEquippedWeapon().m_Enchantments.GetLevel(cEnchantments::enchSilkTouch) > 0)) { switch (m_BlockType) { @@ -562,7 +562,7 @@ void cBlockHandler::Check(cChunkInterface & a_ChunkInterface, cBlockPluginInterf { int BlockX = a_RelX + a_Chunk.GetPosX() * cChunkDef::Width; int BlockZ = a_RelZ + a_Chunk.GetPosZ() * cChunkDef::Width; - DropBlock(a_ChunkInterface, *a_Chunk.GetWorld(), a_PluginInterface, NULL, BlockX, a_RelY, BlockZ); + DropBlock(a_ChunkInterface, *a_Chunk.GetWorld(), a_PluginInterface, nullptr, BlockX, a_RelY, BlockZ); } a_Chunk.SetBlock(a_RelX, a_RelY, a_RelZ, E_BLOCK_AIR, 0); |