fixup gcc 4.4 warning (compare unsigned vs signed int)

Warnings reported here:
http://baldras.wesnoth.org:8080/job/Wesnoth/179/branch=master,compiler=4.4,label=Gentoo-64/consoleText
This commit is contained in:
Chris Beck 2014-06-16 12:41:03 -04:00
parent 156726a6a4
commit 750e759123

View file

@ -252,7 +252,7 @@ inline map_location map_location::get_direction(
return map_location(x,y+n);
}
int x_factor = (dir <= 2u) ? 1 : -1; //whether we go east + or west -
int x_factor = (static_cast<unsigned int> (dir) <= 2u) ? 1 : -1; //whether we go east + or west -
unsigned int tmp_y = dir - 2; //South East => 0, South => 1, South West => 2, North West => 3, North => INT_MAX, North East => INT_MAX - 1
int y_factor = (tmp_y <= 2u) ? 1 : -1; //whether we go south + or north -