summaryrefslogtreecommitdiff
path: root/src/station_type.h
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2010-01-04 18:12:10 +0000
committerrubidium <rubidium@openttd.org>2010-01-04 18:12:10 +0000
commit31b325baafc0abe02c380af63dd6f5fe86f573fd (patch)
treee30c57a9b62586f846c736ccfa4ee5a10eb86049 /src/station_type.h
parent8b88bb0c9bf1072881b4111a339eb6781fdb80bc (diff)
downloadopenttd-31b325baafc0abe02c380af63dd6f5fe86f573fd.tar.xz
(svn r18715) -Codechange: make StationFinder a subclass of TileArea
Diffstat (limited to 'src/station_type.h')
-rw-r--r--src/station_type.h11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/station_type.h b/src/station_type.h
index 141e6dc61..26e766b8c 100644
--- a/src/station_type.h
+++ b/src/station_type.h
@@ -99,19 +99,14 @@ typedef SmallVector<Station *, 2> StationList;
* Structure contains cached list of stations nearby. The list
* is created upon first call to GetStations()
*/
-class StationFinder {
+class StationFinder : TileArea {
StationList stations; ///< List of stations nearby
- TileIndex tile; ///< Northern tile of producer, INVALID_TILE when # stations is valid
- int x_extent; ///< Width of producer
- int y_extent; ///< Height of producer
public:
/**
* Constructs StationFinder
- * @param t northern tile
- * @param dx width of producer
- * @param dy height of producer
+ * @param area the area to search from
*/
- StationFinder(TileIndex t, int dx, int dy) : tile(t), x_extent(dx), y_extent(dy) {}
+ StationFinder(const TileArea &area) : TileArea(area) {}
const StationList *GetStations();
};