Author: mordante
Date: Fri Apr 3 19:56:35 2009
New Revision: 34437
URL: http://svn.gna.org/viewcvs/wesnoth?rev=34437&view=rev
Log:
Fix a compiler warning and code cleanup.
Modified:
trunk/src/mapgen.cpp
Modified: trunk/src/mapgen.cpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/mapgen.cpp?rev=34437&r1=34436&r2=34437&view=diff
==============================================================================
--- trunk/src/mapgen.cpp (original)
+++ trunk/src/mapgen.cpp Fri Apr 3 19:56:35 2009
@@ -623,8 +623,11 @@
//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);
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits