Codechange: Silence warnings about intentionally unused parameters.

This commit is contained in:
frosch
2023-09-16 22:20:53 +02:00
committed by frosch
parent df400ef84a
commit b6c8f301be
227 changed files with 972 additions and 1039 deletions

View File

@@ -148,7 +148,7 @@ static uint NPFHash(TileIndex tile, Trackdir dir)
return ((part1 << NPF_HASH_HALFBITS | part2) + (NPF_HASH_SIZE * dir / TRACKDIR_END)) % NPF_HASH_SIZE;
}
static int32_t NPFCalcZero(AyStar *as, AyStarNode *current, OpenListNode *parent)
static int32_t NPFCalcZero(AyStar *, AyStarNode *, OpenListNode *)
{
return 0;
}
@@ -156,7 +156,7 @@ static int32_t NPFCalcZero(AyStar *as, AyStarNode *current, OpenListNode *parent
/* Calculates the heuristic to the target station or tile. For train stations, it
* takes into account the direction of approach.
*/
static int32_t NPFCalcStationOrTileHeuristic(AyStar *as, AyStarNode *current, OpenListNode *parent)
static int32_t NPFCalcStationOrTileHeuristic(AyStar *as, AyStarNode *current, OpenListNode *)
{
NPFFindStationOrTileData *fstd = (NPFFindStationOrTileData*)as->user_target;
NPFFoundTargetData *ftd = (NPFFoundTargetData*)as->user_path;
@@ -312,7 +312,7 @@ static Vehicle *CountShipProc(Vehicle *v, void *data)
return nullptr;
}
static int32_t NPFWaterPathCost(AyStar *as, AyStarNode *current, OpenListNode *parent)
static int32_t NPFWaterPathCost(AyStar *, AyStarNode *current, OpenListNode *parent)
{
int32_t cost = 0;
Trackdir trackdir = current->direction;
@@ -340,7 +340,7 @@ static int32_t NPFWaterPathCost(AyStar *as, AyStarNode *current, OpenListNode *p
}
/* Determine the cost of this node, for road tracks */
static int32_t NPFRoadPathCost(AyStar *as, AyStarNode *current, OpenListNode *parent)
static int32_t NPFRoadPathCost(AyStar *, AyStarNode *current, OpenListNode *)
{
TileIndex tile = current->tile;
int32_t cost = 0;

View File

@@ -130,7 +130,7 @@ bool BinaryHeap::Push(void *item, int priority)
* known, which speeds up the deleting for some queue's. Should be -1
* if not known.
*/
bool BinaryHeap::Delete(void *item, int priority)
bool BinaryHeap::Delete(void *item, int)
{
uint i = 0;

View File

@@ -28,7 +28,7 @@ public:
* Called by YAPF to attach cached or local segment cost data to the given node.
* @return true if globally cached data were used or false if local data was used
*/
inline bool PfNodeCacheFetch(Node &n)
inline bool PfNodeCacheFetch(Node &)
{
return false;
}
@@ -37,7 +37,7 @@ public:
* Called by YAPF to flush the cached segment cost data back into cache storage.
* Current cache implementation doesn't use that.
*/
inline void PfNodeCacheFlush(Node &n)
inline void PfNodeCacheFlush(Node &)
{
}
};
@@ -84,7 +84,7 @@ public:
* Called by YAPF to flush the cached segment cost data back into cache storage.
* Current cache implementation doesn't use that.
*/
inline void PfNodeCacheFlush(Node &n)
inline void PfNodeCacheFlush(Node &)
{
}
};
@@ -101,7 +101,7 @@ struct CSegmentCostCacheBase
{
static int s_rail_change_counter;
static void NotifyTrackLayoutChange(TileIndex tile, Track track)
static void NotifyTrackLayoutChange(TileIndex, Track)
{
s_rail_change_counter++;
}
@@ -213,7 +213,7 @@ public:
* Called by YAPF to flush the cached segment cost data back into cache storage.
* Current cache implementation doesn't use that.
*/
inline void PfNodeCacheFlush(Node &n)
inline void PfNodeCacheFlush(Node &)
{
}
};

View File

@@ -52,7 +52,7 @@ public:
}
/** Called by YAPF to detect if node ends in the desired destination */
inline bool PfDetectDestination(TileIndex tile, Trackdir td)
inline bool PfDetectDestination(TileIndex tile, Trackdir)
{
bool bDest = IsRailDepotTile(tile);
return bDest;

View File

@@ -417,7 +417,7 @@ public:
return result1;
}
inline Trackdir ChooseRailTrack(const Train *v, TileIndex tile, DiagDirection enterdir, TrackBits tracks, bool &path_found, bool reserve_track, PBSTileInfo *target, TileIndex *dest)
inline Trackdir ChooseRailTrack(const Train *v, TileIndex, DiagDirection, TrackBits, bool &path_found, bool reserve_track, PBSTileInfo *target, TileIndex *dest)
{
if (target != nullptr) target->tile = INVALID_TILE;
if (dest != nullptr) *dest = INVALID_TILE;

View File

@@ -35,7 +35,7 @@ protected:
return *static_cast<Tpf *>(this);
}
int SlopeCost(TileIndex tile, TileIndex next_tile, Trackdir trackdir)
int SlopeCost(TileIndex tile, TileIndex next_tile, Trackdir)
{
/* height of the center of the current tile */
int x1 = TileX(tile) * TILE_SIZE;
@@ -109,7 +109,7 @@ public:
* Calculates only the cost of given node, adds it to the parent node cost
* and stores the result into Node::m_cost member
*/
inline bool PfCalcCost(Node &n, const TrackFollower *tf)
inline bool PfCalcCost(Node &n, const TrackFollower *)
{
int segment_cost = 0;
uint tiles = 0;
@@ -202,7 +202,7 @@ public:
return IsRoadDepotTile(n.m_segment_last_tile);
}
inline bool PfDetectDestinationTile(TileIndex tile, Trackdir trackdir)
inline bool PfDetectDestinationTile(TileIndex tile, Trackdir)
{
return IsRoadDepotTile(tile);
}