summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2015-04-16 20:59:57 +0200
committerMattes D <github@xoft.cz>2015-04-16 20:59:57 +0200
commitffe7dae4fc4ee9d622696f221dcfa4def107646d (patch)
tree8fe28f4a22972d151db339126739395960d1f670 /src
parentMerge pull request #1858 from mc-server/BucketPluginCalls (diff)
downloadcuberite-ffe7dae4fc4ee9d622696f221dcfa4def107646d.tar
cuberite-ffe7dae4fc4ee9d622696f221dcfa4def107646d.tar.gz
cuberite-ffe7dae4fc4ee9d622696f221dcfa4def107646d.tar.bz2
cuberite-ffe7dae4fc4ee9d622696f221dcfa4def107646d.tar.lz
cuberite-ffe7dae4fc4ee9d622696f221dcfa4def107646d.tar.xz
cuberite-ffe7dae4fc4ee9d622696f221dcfa4def107646d.tar.zst
cuberite-ffe7dae4fc4ee9d622696f221dcfa4def107646d.zip
Diffstat (limited to 'src')
-rw-r--r--src/Blocks/BlockHandler.cpp2
-rw-r--r--src/CraftingRecipes.cpp1
-rw-r--r--src/Items/ItemHandler.cpp4
3 files changed, 4 insertions, 3 deletions
diff --git a/src/Blocks/BlockHandler.cpp b/src/Blocks/BlockHandler.cpp
index 2de4a3e4c..6fff4c18f 100644
--- a/src/Blocks/BlockHandler.cpp
+++ b/src/Blocks/BlockHandler.cpp
@@ -353,7 +353,7 @@ bool cBlockHandler::GetPlacementBlockTypeMeta(
{
// By default, all blocks can be placed and the meta is copied over from the item's damage value:
a_BlockType = m_BlockType;
- a_BlockMeta = (NIBBLETYPE)(a_Player->GetEquippedItem().m_ItemDamage & 0x0f);
+ a_BlockMeta = static_cast<NIBBLETYPE>(a_Player->GetEquippedItem().m_ItemDamage & 0x0f);
return true;
}
diff --git a/src/CraftingRecipes.cpp b/src/CraftingRecipes.cpp
index 202fb900e..cf8982afb 100644
--- a/src/CraftingRecipes.cpp
+++ b/src/CraftingRecipes.cpp
@@ -366,6 +366,7 @@ void cCraftingRecipes::ClearRecipes(void)
void cCraftingRecipes::AddRecipeLine(int a_LineNum, const AString & a_RecipeLine)
{
+ // Remove any spaces within the line:
AString RecipeLine(a_RecipeLine);
RecipeLine.erase(std::remove_if(RecipeLine.begin(), RecipeLine.end(), isspace), RecipeLine.end());
diff --git a/src/Items/ItemHandler.cpp b/src/Items/ItemHandler.cpp
index b3f24f9ee..f38e2a3e3 100644
--- a/src/Items/ItemHandler.cpp
+++ b/src/Items/ItemHandler.cpp
@@ -336,7 +336,7 @@ bool cItemHandler::OnPlayerPlace(
if (
BlockHandler(ClickedBlock)->DoesIgnoreBuildCollision() ||
BlockHandler(ClickedBlock)->DoesIgnoreBuildCollision(&a_Player, ClickedBlockMeta)
- )
+ )
{
cChunkInterface ChunkInterface(a_World.GetChunkMap());
BlockHandler(ClickedBlock)->OnDestroyedByPlayer(ChunkInterface, a_World, &a_Player, a_BlockX, a_BlockY, a_BlockZ);
@@ -757,7 +757,7 @@ bool cItemHandler::GetPlacementBlockTypeMeta(
return false;
}
- cBlockHandler * BlockH = BlockHandler((BLOCKTYPE)m_ItemType);
+ cBlockHandler * BlockH = BlockHandler(static_cast<BLOCKTYPE>(m_ItemType));
cChunkInterface ChunkInterface(a_World->GetChunkMap());
return BlockH->GetPlacementBlockTypeMeta(
ChunkInterface, a_Player,