From 8d86a5de56125762c8c4cbdced0d90b82f4a8682 Mon Sep 17 00:00:00 2001 From: Rubidium Date: Sun, 10 Mar 2024 14:35:28 +0100 Subject: [PATCH] Codechange: remove std::source_location since it's unused now --- src/map.cpp | 2 +- src/map_func.h | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/map.cpp b/src/map.cpp index 69b01ceaa2..7dd29ff6d9 100644 --- a/src/map.cpp +++ b/src/map.cpp @@ -64,7 +64,7 @@ #ifdef _DEBUG -TileIndex TILE_ADD(TileIndex tile, TileIndexDiff offset, std::source_location location) +TileIndex TILE_ADD(TileIndex tile, TileIndexDiff offset) { int dx = offset & Map::MaxX(); if (dx >= (int)Map::SizeX() / 2) dx -= Map::SizeX(); diff --git a/src/map_func.h b/src/map_func.h index 8a232e4c6e..f2713f243e 100644 --- a/src/map_func.h +++ b/src/map_func.h @@ -463,9 +463,9 @@ inline TileIndexDiff ToTileIndexDiff(TileIndexDiffC tidc) * @return The resulting tile. */ #ifndef _DEBUG - constexpr TileIndex TILE_ADD(TileIndex tile, TileIndexDiff offset, [[maybe_unused]] const std::source_location location = std::source_location::current()) { return tile + offset; } + constexpr TileIndex TILE_ADD(TileIndex tile, TileIndexDiff offset) { return tile + offset; } #else - TileIndex TILE_ADD(TileIndex tile, TileIndexDiff offset, const std::source_location location = std::source_location::current()); + TileIndex TILE_ADD(TileIndex tile, TileIndexDiff offset); #endif /** @@ -476,9 +476,9 @@ inline TileIndexDiff ToTileIndexDiff(TileIndexDiffC tidc) * @param y The y offset to add to the tile. * @return The resulting tile. */ -inline TileIndex TILE_ADDXY(TileIndex tile, int x, int y, const std::source_location location = std::source_location::current()) +inline TileIndex TILE_ADDXY(TileIndex tile, int x, int y) { - return TILE_ADD(tile, TileDiffXY(x, y), location); + return TILE_ADD(tile, TileDiffXY(x, y)); } TileIndex TileAddWrap(TileIndex tile, int addx, int addy);