1
0

Merge pull request #410 from worktycho/master

Micelanious fixes for various warnings
This commit is contained in:
Mattes D 2013-12-09 12:16:57 -08:00
commit 567354b3ca
6 changed files with 22 additions and 12 deletions

View File

@ -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));

View File

@ -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)
}

View File

@ -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;

View File

@ -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;
}

View File

@ -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:

View File

@ -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)