summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortruelight <truelight@openttd.org>2006-02-13 21:56:49 +0000
committertruelight <truelight@openttd.org>2006-02-13 21:56:49 +0000
commit604a1a9974dda7859eb55a503fc12fb01ca5c5d3 (patch)
tree6f70c227631a1be8ee05667e10e925a5fc63d52d
parent0068f19605f97de862a68da0a2340f724a9bb331 (diff)
downloadopenttd-604a1a9974dda7859eb55a503fc12fb01ca5c5d3.tar.xz
(svn r3599) -Fix: added some casts to suppress some more warnings
-rw-r--r--pathfind.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/pathfind.c b/pathfind.c
index 10961c5ec..6da852771 100644
--- a/pathfind.c
+++ b/pathfind.c
@@ -559,7 +559,7 @@ static bool NtpVisit(NewTrackPathFinder *tpf, TileIndex tile, uint dir, uint len
do {
link = NTP_GET_LINK_PTR(tpf, offs);
if (tile == link->tile && (link->typelength & 0x3U) == dir) {
- if (length >= link->typelength >> 2) return false;
+ if (length >= (uint)(link->typelength >> 2)) return false;
link->typelength = dir | (length << 2);
return true;
}
@@ -612,8 +612,8 @@ static bool NtpCheck(NewTrackPathFinder *tpf, TileIndex tile, uint dir, uint len
for (;;) {
link = NTP_GET_LINK_PTR(tpf, offs);
if (tile == link->tile && (link->typelength & 0x3U) == dir) {
- assert(link->typelength >> 2 <= length);
- return length == link->typelength >> 2;
+ assert((uint)(link->typelength >> 2) <= length);
+ return length == (uint)(link->typelength >> 2);
}
offs = link->next;
assert(offs != 0xffff);