Fix a compiler warning and code cleanup.

This commit is contained in:
Mark de Wever 2009-04-03 17:56:35 +00:00
parent 7929512392
commit 104b5e2120

View file

@ -623,8 +623,11 @@ static void flood_name(const map_location& start, const std::string& name, std::
//if adjacent tiles are tiles and unnamed, name them
for (n = 0; n < 6; n++) {
//we do not care for tiles outside the middle part
if (adj[n].x >= (width / 3) ) {continue;}
if (adj[n].y >= (height / 3) ) {continue;}
if (adj[n].x >= static_cast<int>(width / 3)
|| adj[n].y >= static_cast<int>(height / 3) ) {
continue;
}
const t_translation::t_terrain terr = terrain[adj[n].x + (width / 3)][adj[n].y + (height / 3)];
const location loc(adj[n].x, adj[n].y);