1
0

AString logging fix

git-svn-id: http://mc-server.googlecode.com/svn/trunk@217 0a769ca7-a7f5-676a-18bf-c427514a06d6
This commit is contained in:
madmaxoft@gmail.com 2012-02-01 13:50:09 +00:00
parent 2568bad3cc
commit ef196ec22f

View File

@ -910,7 +910,7 @@ bool cChunk::LoadFromDisk()
if (f.Read(m_BlockData, sizeof(m_BlockData)) != sizeof(m_BlockData)) if (f.Read(m_BlockData, sizeof(m_BlockData)) != sizeof(m_BlockData))
{ {
LOGERROR("ERROR READING FROM FILE %s", SourceFile); LOGERROR("ERROR READING FROM FILE %s", SourceFile.c_str());
return false; return false;
} }
@ -927,7 +927,7 @@ bool cChunk::LoadFromDisk()
cChestEntity * ChestEntity = new cChestEntity( 0, 0, 0, this ); cChestEntity * ChestEntity = new cChestEntity( 0, 0, 0, this );
if (!ChestEntity->LoadFromFile(f)) if (!ChestEntity->LoadFromFile(f))
{ {
LOGERROR("ERROR READING CHEST FROM FILE %s", SourceFile ); LOGERROR("ERROR READING CHEST FROM FILE %s", SourceFile.c_str());
delete ChestEntity; delete ChestEntity;
return false; return false;
} }
@ -940,7 +940,7 @@ bool cChunk::LoadFromDisk()
cFurnaceEntity* FurnaceEntity = new cFurnaceEntity( 0, 0, 0, this ); cFurnaceEntity* FurnaceEntity = new cFurnaceEntity( 0, 0, 0, this );
if (!FurnaceEntity->LoadFromFile(f)) if (!FurnaceEntity->LoadFromFile(f))
{ {
LOGERROR("ERROR READING FURNACE FROM FILE %s", SourceFile ); LOGERROR("ERROR READING FURNACE FROM FILE %s", SourceFile.c_str());
delete FurnaceEntity; delete FurnaceEntity;
return false; return false;
} }
@ -955,7 +955,7 @@ bool cChunk::LoadFromDisk()
cSignEntity * SignEntity = new cSignEntity(BlockType, 0, 0, 0, this ); cSignEntity * SignEntity = new cSignEntity(BlockType, 0, 0, 0, this );
if (!SignEntity->LoadFromFile( f ) ) if (!SignEntity->LoadFromFile( f ) )
{ {
LOGERROR("ERROR READING SIGN FROM FILE %s", SourceFile ); LOGERROR("ERROR READING SIGN FROM FILE %s", SourceFile.c_str());
delete SignEntity; delete SignEntity;
return false; return false;
} }
@ -976,11 +976,11 @@ bool cChunk::LoadFromDisk()
// Delete old format file // Delete old format file
if (std::remove(SourceFile.c_str()) != 0) if (std::remove(SourceFile.c_str()) != 0)
{ {
LOGERROR("Could not delete file %s", SourceFile ); LOGERROR("Could not delete file %s", SourceFile.c_str());
} }
else else
{ {
LOGINFO("Successfully deleted old format file \"%s\"", SourceFile ); LOGINFO("Successfully deleted old format file \"%s\"", SourceFile.c_str());
} }
return true; return true;
} }
@ -993,7 +993,7 @@ bool cChunk::SaveToDisk()
{ {
assert(!"Old save format not supported anymore"); // Remove the call to this function assert(!"Old save format not supported anymore"); // Remove the call to this function
return true; //no more saving old format! return false; //no more saving old format!
} }