From 38bd9e93a252cb2dd5ace6b0132514edff38b504 Mon Sep 17 00:00:00 2001 From: kwolekr Date: Sun, 18 Jan 2015 23:29:19 -0500 Subject: Fix all warnings and remove -Wno-unused-but-set cflag --- src/mapblock.cpp | 72 ++++++++++++++++++++++++++++---------------------------- 1 file changed, 36 insertions(+), 36 deletions(-) (limited to 'src/mapblock.cpp') diff --git a/src/mapblock.cpp b/src/mapblock.cpp index 255b661b0..4cc0abc81 100644 --- a/src/mapblock.cpp +++ b/src/mapblock.cpp @@ -62,7 +62,7 @@ MapBlock::MapBlock(Map *parent, v3s16 pos, IGameDef *gamedef, bool dummy): data = NULL; if(dummy == false) reallocate(); - + #ifndef SERVER mesh = NULL; #endif @@ -73,7 +73,7 @@ MapBlock::~MapBlock() #ifndef SERVER { //JMutexAutoLock lock(mesh_mutex); - + if(mesh) { delete mesh; @@ -115,7 +115,7 @@ MapNode MapBlock::getNodeParent(v3s16 p, bool *is_valid_position) /* Propagates sunlight down through the block. Doesn't modify nodes that are not affected by sunlight. - + Returns false if sunlight at bottom block is invalid. Returns true if sunlight at bottom block is valid. Returns true if bottom block doesn't exist. @@ -138,16 +138,16 @@ bool MapBlock::propagateSunlight(std::set & light_sources, // Whether the sunlight at the top of the bottom block is valid bool block_below_is_valid = true; - + v3s16 pos_relative = getPosRelative(); - + for(s16 x=0; x & light_sources, } else { - no_top_block = true; - + //no_top_block = true; + // NOTE: This makes over-ground roofed places sunlighted // Assume sunlight, unless is_underground==true if(is_underground) @@ -211,19 +211,19 @@ bool MapBlock::propagateSunlight(std::set & light_sources, <<", is_underground="<= 25){ // Node timers m_node_timers.serialize(os, version); @@ -626,7 +626,7 @@ void MapBlock::deSerialize(std::istream &is, u8 version, bool disk) { if(!ser_ver_supported(version)) throw VersionMismatchException("ERROR: MapBlock format not supported"); - + TRACESTREAM(<<"MapBlock::deSerialize "<= 10) { // Uncompress and set param2 data @@ -852,7 +852,7 @@ void MapBlock::deSerialize_pre22(std::istream &is, u8 version, bool disk) databuf_nodelist[i*ser_length + 1] = s[i+nodecount]; databuf_nodelist[i*ser_length + 2] = s[i+nodecount*2]; } - + /* NodeMetadata */ @@ -989,12 +989,12 @@ std::string analyze_block(MapBlock *block) return "NULL"; std::ostringstream desc; - + v3s16 p = block->getPos(); char spos[20]; snprintf(spos, 20, "(%2d,%2d,%2d), ", p.X, p.Y, p.Z); desc<getModified()) { case MOD_STATE_CLEAN: @@ -1051,21 +1051,21 @@ std::string analyze_block(MapBlock *block) else full_air = false; } - + desc<<"content {"; - + std::ostringstream ss; - + if(full_ignore) ss<<"IGNORE (full), "; else if(some_ignore) ss<<"IGNORE, "; - + if(full_air) ss<<"AIR (full), "; else if(some_air) ss<<"AIR, "; - + if(ss.str().size()>=2) desc<