From 5cc6d1f894f224b3fdde6cdb5535ce4154172f09 Mon Sep 17 00:00:00 2001 From: rubidium Date: Mon, 31 Aug 2009 22:18:17 +0000 Subject: (svn r17335) -Fix (r17333): don't return a pointer as boolean --- src/yapf/yapf_road.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/yapf/yapf_road.cpp b/src/yapf/yapf_road.cpp index 2fe1e2374..9bc39c3bf 100644 --- a/src/yapf/yapf_road.cpp +++ b/src/yapf/yapf_road.cpp @@ -488,7 +488,8 @@ bool YapfFindNearestRoadDepot(const Vehicle *v, int max_distance, TileIndex *dep /* handle the case when our vehicle is already in the depot tile */ if (IsRoadDepotTile(tile)) { /* only what we need to return is the Depot* */ - return Depot::GetByTile(tile); + *depot_tile = tile; + return true; } /* default is YAPF type 2 */ -- cgit v1.2.3-70-g09d2