Add some [[maybe_unused]] tags for when asserts are disabled

wip-string
Jonathan G Rennison 5 months ago
parent 9ea49d6680
commit 8751bd2ba7

@ -836,7 +836,7 @@ static void PublicRoad_FoundEndNode(AyStar *aystar, OpenListNode *current)
// We only get here if we have a parent and we're not adjacent to it. River/Tunnel time!
const DiagDirection road_direction = DiagdirBetweenTiles(tile, path->parent->node.tile);
auto end_tile = INVALID_TILE;
[[maybe_unused]] auto end_tile = INVALID_TILE;
const Slope tile_slope = GetTileSlope(tile);
if (IsUpwardsSlope(tile_slope, road_direction)) {

@ -3430,7 +3430,7 @@ private:
* Show a drop down list using @p list_set, setting the pre-selected item to the one corresponding to @p value
* This asserts if @p value is not in @p list_set, and @p missing_ok is false
*/
void ShowCompanyDropDownListWithValue(CompanyID value, bool missing_ok, int button)
void ShowCompanyDropDownListWithValue(CompanyID value, [[maybe_unused]] bool missing_ok, int button)
{
DropDownList list;

@ -49,7 +49,7 @@ Tunnel::~Tunnel()
tunnel_tile_index_map.erase(this->tile_s);
}
bool have_erased = false;
[[maybe_unused]] bool have_erased = false;
const auto key = GetTunnelAxisHeightCacheKey(this);
for (auto it = tunnel_axis_height_index.lower_bound(key); it != tunnel_axis_height_index.end() && it->first == key; ++it) {
if (it->second == this) {

Loading…
Cancel
Save