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:
parent
156726a6a4
commit
750e759123
1 changed files with 1 additions and 1 deletions
|
@ -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 -
|
||||
|
|
Loading…
Add table
Reference in a new issue