Misc fixes for warnings...

develop
Petr Mrázek 2012-03-10 16:03:11 +01:00
parent cff654bca6
commit 75113b715a
6 changed files with 6 additions and 6 deletions

@ -75,6 +75,7 @@ namespace DFHack
protected: protected:
virtual int sync() { virtual int sync() {
owner->flush_buffer(true); owner->flush_buffer(true);
return 0;
} }
}; };

@ -80,7 +80,7 @@ DFHACK_EXPORT bool Read (const uint32_t index, t_building & building);
* read mapping from custom_type value to building RAW name * read mapping from custom_type value to building RAW name
* custom_type of -1 implies ordinary building * custom_type of -1 implies ordinary building
*/ */
DFHACK_EXPORT bool ReadCustomWorkshopTypes(color_ostream &out, std::map <uint32_t, std::string> & btypes); DFHACK_EXPORT bool ReadCustomWorkshopTypes(std::map <uint32_t, std::string> & btypes);
} }
} }

@ -72,18 +72,16 @@ bool Buildings::Read (const uint32_t index, t_building & building)
return true; return true;
} }
bool Buildings::ReadCustomWorkshopTypes(color_ostream &out, map <uint32_t, string> & btypes) bool Buildings::ReadCustomWorkshopTypes(map <uint32_t, string> & btypes)
{ {
vector <building_def *> & bld_def = world->raws.buildings.all; vector <building_def *> & bld_def = world->raws.buildings.all;
uint32_t size = bld_def.size(); uint32_t size = bld_def.size();
btypes.clear(); btypes.clear();
out.print("Probing vector at 0x%x for custom workshops.\n", &bld_def);
for (auto iter = bld_def.begin(); iter != bld_def.end();iter++) for (auto iter = bld_def.begin(); iter != bld_def.end();iter++)
{ {
building_def * temp = *iter; building_def * temp = *iter;
btypes[temp->id] = temp->code; btypes[temp->id] = temp->code;
out.print("%d : %s\n",temp->id, temp->code.c_str());
} }
return true; return true;
} }

@ -494,7 +494,6 @@ bool Gui::getViewCoords (int32_t &x, int32_t &y, int32_t &z)
bool Gui::setViewCoords (const int32_t x, const int32_t y, const int32_t z) bool Gui::setViewCoords (const int32_t x, const int32_t y, const int32_t z)
{ {
auto cursor = df::global::cursor;
(*df::global::window_x) = x; (*df::global::window_x) = x;
(*df::global::window_y) = y; (*df::global::window_y) = y;
(*df::global::window_z) = z; (*df::global::window_z) = z;

@ -200,7 +200,6 @@ bool Maps::WriteDirtyBit(uint32_t x, uint32_t y, uint32_t z, bool dirtybit)
} }
return false; return false;
} }
/*
/* /*
* Block flags * Block flags
*/ */

@ -138,6 +138,9 @@ command_result df_showmood (color_ostream &out, vector <string> & parameters)
case job_type::StrangeMoodFell: case job_type::StrangeMoodFell:
out.print("enter a fell mood?"); out.print("enter a fell mood?");
break; break;
default:
out.print("do something else...");
break;
} }
break; break;