diff options
author | alberth <alberth@openttd.org> | 2011-02-25 22:04:38 +0000 |
---|---|---|
committer | alberth <alberth@openttd.org> | 2011-02-25 22:04:38 +0000 |
commit | 31386c42a7aa51b5b6a7abfc728b9ed4e34df0ea (patch) | |
tree | 793449a253b91916b65c373f54b4544a8c6c86b8 /src/pathfinder | |
parent | 1dbc0a20bed5cd85035b4f84a649c4f7386b07ab (diff) | |
download | openttd-31386c42a7aa51b5b6a7abfc728b9ed4e34df0ea.tar.xz |
(svn r22145) -Codechange: Do explicit test for non-bool values.
Diffstat (limited to 'src/pathfinder')
-rw-r--r-- | src/pathfinder/follow_track.hpp | 2 | ||||
-rw-r--r-- | src/pathfinder/npf/npf.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/pathfinder/follow_track.hpp b/src/pathfinder/follow_track.hpp index 8656a4f05..c32b7b704 100644 --- a/src/pathfinder/follow_track.hpp +++ b/src/pathfinder/follow_track.hpp @@ -456,7 +456,7 @@ public: } /* if min speed was requested, return it */ - if (pmin_speed) *pmin_speed = min_speed; + if (pmin_speed != NULL) *pmin_speed = min_speed; return max_speed; } }; diff --git a/src/pathfinder/npf/npf.cpp b/src/pathfinder/npf/npf.cpp index f8ab9c2f0..9eca606f0 100644 --- a/src/pathfinder/npf/npf.cpp +++ b/src/pathfinder/npf/npf.cpp @@ -981,7 +981,7 @@ static NPFFoundTargetData NPFRouteInternal(AyStarNode *start1, bool ignore_start start1->user_data[NPF_NODE_FLAGS] = 0; NPFSetFlag(start1, NPF_FLAG_IGNORE_START_TILE, ignore_start_tile1); _npf_aystar.AddStartNode(start1, 0); - if (start2) { + if (start2 != NULL) { start2->user_data[NPF_TRACKDIR_CHOICE] = INVALID_TRACKDIR; start2->user_data[NPF_NODE_FLAGS] = 0; NPFSetFlag(start2, NPF_FLAG_IGNORE_START_TILE, ignore_start_tile2); |