summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2013-12-09 21:16:57 +0100
committerMattes D <github@xoft.cz>2013-12-09 21:16:57 +0100
commit567354b3caf1c7798ee12b48103421c022a0afe1 (patch)
treead9d9680ee78a0a9ba8d1fc5e63045c07528f286 /src
parentFixed angle normalization typo. (diff)
parentfixed warnings in src/Generating/BioGen.cpp (diff)
downloadcuberite-567354b3caf1c7798ee12b48103421c022a0afe1.tar
cuberite-567354b3caf1c7798ee12b48103421c022a0afe1.tar.gz
cuberite-567354b3caf1c7798ee12b48103421c022a0afe1.tar.bz2
cuberite-567354b3caf1c7798ee12b48103421c022a0afe1.tar.lz
cuberite-567354b3caf1c7798ee12b48103421c022a0afe1.tar.xz
cuberite-567354b3caf1c7798ee12b48103421c022a0afe1.tar.zst
cuberite-567354b3caf1c7798ee12b48103421c022a0afe1.zip
Diffstat (limited to '')
-rw-r--r--src/Bindings/LuaWindow.cpp5
-rw-r--r--src/Chunk.cpp6
-rw-r--r--src/Generating/BioGen.cpp2
-rw-r--r--src/Simulator/FluidSimulator.cpp7
-rw-r--r--src/UI/SlotArea.cpp6
-rw-r--r--src/UI/Window.cpp8
6 files changed, 22 insertions, 12 deletions
diff --git a/src/Bindings/LuaWindow.cpp b/src/Bindings/LuaWindow.cpp
index 18d8b4467..733304eb2 100644
--- a/src/Bindings/LuaWindow.cpp
+++ b/src/Bindings/LuaWindow.cpp
@@ -1,4 +1,3 @@
-
// LuaWindow.cpp
// Implements the cLuaWindow class representing a virtual window that plugins may create and open for the player
@@ -37,6 +36,10 @@ cLuaWindow::cLuaWindow(cWindow::WindowType a_WindowType, int a_SlotsX, int a_Slo
m_SlotAreas.push_back(new cSlotAreaArmor(*this));
break;
}
+ default:
+ {
+ break;
+ }
}
m_SlotAreas.push_back(new cSlotAreaInventory(*this));
m_SlotAreas.push_back(new cSlotAreaHotBar(*this));
diff --git a/src/Chunk.cpp b/src/Chunk.cpp
index 4386ffcb8..9c195fdf8 100644
--- a/src/Chunk.cpp
+++ b/src/Chunk.cpp
@@ -1,4 +1,3 @@
-
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
#ifndef _WIN32
@@ -908,8 +907,11 @@ void cChunk::ApplyWeatherToTop()
}
break;
} // case (snowy biomes)
-
// TODO: Rainy biomes should check for farmland and cauldrons
+ default:
+ {
+ break;
+ }
} // switch (biome)
}
diff --git a/src/Generating/BioGen.cpp b/src/Generating/BioGen.cpp
index a0407a145..98999dee9 100644
--- a/src/Generating/BioGen.cpp
+++ b/src/Generating/BioGen.cpp
@@ -376,7 +376,6 @@ void cBioGenDistortedVoronoi::GenBiomes(int a_ChunkX, int a_ChunkZ, cChunkDef::B
for (int z = 0; z < cChunkDef::Width; z++)
{
- int AbsoluteZ = BaseZ + z;
for (int x = 0; x < cChunkDef::Width; x++)
{
int VoronoiCellValue = m_Voronoi.GetValueAt(DistortX[x][z], DistortZ[x][z]) / 8;
@@ -727,6 +726,7 @@ void cBioGenMultiStepMap::FreezeWaterBiomes(cChunkDef::BiomeMap & a_BiomeMap, co
{
case biRiver: cChunkDef::SetBiome(a_BiomeMap, x, z, biFrozenRiver); break;
case biOcean: cChunkDef::SetBiome(a_BiomeMap, x, z, biFrozenOcean); break;
+ default: break;
}
} // for x
idx += 1;
diff --git a/src/Simulator/FluidSimulator.cpp b/src/Simulator/FluidSimulator.cpp
index dac666484..72b2eb628 100644
--- a/src/Simulator/FluidSimulator.cpp
+++ b/src/Simulator/FluidSimulator.cpp
@@ -1,4 +1,3 @@
-
#include "Globals.h"
#include "FluidSimulator.h"
@@ -138,7 +137,7 @@ Direction cFluidSimulator::GetFlowingDirection(int a_X, int a_Y, int a_Z, bool a
*/
NIBBLETYPE LowestPoint = m_World.GetBlockMeta(a_X, a_Y, a_Z); //Current Block Meta so only lower points will be counted
- int X = 0, Y = 0, Z = 0; //Lowest Pos will be stored here
+ int X = 0, Z = 0; //Lowest Pos will be stored here
if (IsAllowedBlock(m_World.GetBlock(a_X, a_Y + 1, a_Z)) && a_Over) //check for upper block to flow because this also affects the flowing direction
{
@@ -167,14 +166,14 @@ Direction cFluidSimulator::GetFlowingDirection(int a_X, int a_Y, int a_Z, bool a
{
LowestPoint = Meta;
X = Pos->x;
- Y = Pos->y;
+ Pos->y; //Remove if no side effects
Z = Pos->z;
}
}else if(BlockID == E_BLOCK_AIR)
{
LowestPoint = 9; //This always dominates
X = Pos->x;
- Y = Pos->y;
+ Pos->y; //Remove if no side effects
Z = Pos->z;
}
diff --git a/src/UI/SlotArea.cpp b/src/UI/SlotArea.cpp
index e743f4bb3..61e432665 100644
--- a/src/UI/SlotArea.cpp
+++ b/src/UI/SlotArea.cpp
@@ -1,4 +1,3 @@
-
// SlotArea.cpp
// Implements the cSlotArea class and its descendants
@@ -65,6 +64,10 @@ void cSlotArea::Clicked(cPlayer & a_Player, int a_SlotNum, eClickAction a_ClickA
DblClicked(a_Player, a_SlotNum);
return;
}
+ default:
+ {
+ break;
+ }
}
cItem Slot(*GetSlot(a_SlotNum, a_Player));
@@ -443,7 +446,6 @@ void cSlotAreaCrafting::OnPlayerRemoved(cPlayer & a_Player)
void cSlotAreaCrafting::ClickedResult(cPlayer & a_Player)
{
- const cItem * ResultSlot = GetSlot(0, a_Player);
cItem & DraggingItem = a_Player.GetDraggingItem();
// Get the current recipe:
diff --git a/src/UI/Window.cpp b/src/UI/Window.cpp
index 5ca31fa3e..ee75921d1 100644
--- a/src/UI/Window.cpp
+++ b/src/UI/Window.cpp
@@ -28,9 +28,9 @@ cWindow::cWindow(WindowType a_WindowType, const AString & a_WindowTitle) :
m_WindowID((++m_WindowIDCounter) % 127),
m_WindowType(a_WindowType),
m_WindowTitle(a_WindowTitle),
- m_Owner(NULL),
m_IsDestroyed(false),
- m_ShouldDistributeToHotbarFirst(true)
+ m_ShouldDistributeToHotbarFirst(true),
+ m_Owner(NULL)
{
if (a_WindowType == wtInventory)
{
@@ -201,6 +201,10 @@ void cWindow::Clicked(
case caRightPaintProgress: OnPaintProgress(a_Player, a_SlotNum); return;
case caLeftPaintEnd: OnLeftPaintEnd (a_Player); return;
case caRightPaintEnd: OnRightPaintEnd(a_Player); return;
+ default:
+ {
+ break;
+ }
}
if (a_SlotNum < 0)