From 4e6d827ea6c958c8f45ec7d7c734f8823925136f Mon Sep 17 00:00:00 2001 From: frosch Date: Wed, 25 Jun 2008 18:46:05 +0000 Subject: (svn r13632) -Codechange: Use 'void *' for user-data of CircularTileSearch(). --- src/map.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/map.cpp') diff --git a/src/map.cpp b/src/map.cpp index 640864c0a..12f7a0266 100644 --- a/src/map.cpp +++ b/src/map.cpp @@ -261,12 +261,12 @@ uint DistanceFromEdge(TileIndex tile) * @param tile to start the search from. Upon completion, it will return the tile matching the search * @param size: number of tiles per side of the desired search area * @param proc: callback testing function pointer. - * @param data to be passed to the callback function. Depends on the implementation + * @param user_data to be passed to the callback function. Depends on the implementation * @return result of the search * @pre proc != NULL * @pre size > 0 */ -bool CircularTileSearch(TileIndex *tile, uint size, TestTileOnSearchProc proc, uint32 data) +bool CircularTileSearch(TileIndex *tile, uint size, TestTileOnSearchProc proc, void *user_data) { uint n, x, y; DiagDirection dir; @@ -281,7 +281,7 @@ bool CircularTileSearch(TileIndex *tile, uint size, TestTileOnSearchProc proc, u /* If the length of the side is uneven, the center has to be checked * separately, as the pattern of uneven sides requires to go around the center */ n = 2; - if (proc(TileXY(x, y), data)) { + if (proc(TileXY(x, y), user_data)) { *tile = TileXY(x, y); return true; } @@ -304,7 +304,7 @@ bool CircularTileSearch(TileIndex *tile, uint size, TestTileOnSearchProc proc, u uint j; for (j = n; j != 0; j--) { if (x <= MapMaxX() && y <= MapMaxY() && ///< Is the tile within the map? - proc(TileXY(x, y), data)) { ///< Is the callback successful? + proc(TileXY(x, y), user_data)) { ///< Is the callback successful? *tile = TileXY(x, y); return true; ///< then stop the search } -- cgit v1.2.3-54-g00ecf