Small changes; warning fixing.
This commit is contained in:
parent
0f7bd9fc77
commit
62e5234535
@ -143,7 +143,7 @@ protected:
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// cByteBuffer:
|
||||
|
||||
cByteBuffer::cByteBuffer(int a_BufferSize) :
|
||||
cByteBuffer::cByteBuffer(size_t a_BufferSize) :
|
||||
m_Buffer(new char[a_BufferSize + 1]),
|
||||
m_BufferSize(a_BufferSize + 1),
|
||||
#ifdef _DEBUG
|
||||
|
@ -27,7 +27,7 @@ their own synchronization.
|
||||
class cByteBuffer
|
||||
{
|
||||
public:
|
||||
cByteBuffer(int a_BufferSize);
|
||||
cByteBuffer(size_t a_BufferSize);
|
||||
~cByteBuffer();
|
||||
|
||||
/// Writes the bytes specified to the ringbuffer. Returns true if successful, false if not
|
||||
|
@ -9,7 +9,6 @@
|
||||
|
||||
|
||||
cMCLogger * cMCLogger::s_MCLogger = NULL;
|
||||
bool g_ShouldColorOutput = false;
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <io.h> // Needed for _isatty(), not available on Linux
|
||||
@ -33,7 +32,8 @@ cMCLogger * cMCLogger::GetInstance(void)
|
||||
|
||||
|
||||
|
||||
cMCLogger::cMCLogger(void)
|
||||
cMCLogger::cMCLogger(void):
|
||||
g_ShouldColorOutput(false)
|
||||
{
|
||||
AString FileName;
|
||||
Printf(FileName, "LOG_%d.txt", (int)time(NULL));
|
||||
|
@ -52,6 +52,7 @@ private:
|
||||
cCriticalSection m_CriticalSection;
|
||||
cLog * m_Log;
|
||||
static cMCLogger * s_MCLogger;
|
||||
bool g_ShouldColorOutput;
|
||||
|
||||
|
||||
/// Sets the specified color scheme in the terminal (TODO: if coloring available)
|
||||
|
@ -316,12 +316,9 @@ int cWorld::GetDefaultWeatherInterval(eWeather a_Weather)
|
||||
{
|
||||
return 2400 + (m_TickRand.randInt() % 4800); // 2 - 6 minutes
|
||||
}
|
||||
default:
|
||||
{
|
||||
LOGWARNING("%s: Missing default weather interval for weather %d.", __FUNCTION__, a_Weather);
|
||||
return -1;
|
||||
}
|
||||
} // switch (Weather)
|
||||
}
|
||||
LOGWARNING("%s: Missing default weather interval for weather %d.", __FUNCTION__, a_Weather);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
|
@ -621,10 +621,10 @@ void cNBTChunkSerializer::AddHangingEntity(cHangingEntity * a_Hanging)
|
||||
m_Writer.AddInt("TileZ", a_Hanging->GetTileZ());
|
||||
switch (a_Hanging->GetDirection())
|
||||
{
|
||||
case 0: m_Writer.AddByte("Dir", (unsigned char)2); break;
|
||||
case 1: m_Writer.AddByte("Dir", (unsigned char)1); break;
|
||||
case 2: m_Writer.AddByte("Dir", (unsigned char)0); break;
|
||||
case 3: m_Writer.AddByte("Dir", (unsigned char)3); break;
|
||||
case BLOCK_FACE_YM: m_Writer.AddByte("Dir", (unsigned char)2); break;
|
||||
case BLOCK_FACE_YP: m_Writer.AddByte("Dir", (unsigned char)1); break;
|
||||
case BLOCK_FACE_ZM: m_Writer.AddByte("Dir", (unsigned char)0); break;
|
||||
case BLOCK_FACE_ZP: m_Writer.AddByte("Dir", (unsigned char)3); break;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user