diff --git a/src/core/bitmath_func.hpp b/src/core/bitmath_func.hpp index 01822301e7..4e9a2cd933 100644 --- a/src/core/bitmath_func.hpp +++ b/src/core/bitmath_func.hpp @@ -141,18 +141,6 @@ constexpr T ClrBit(T &x, const uint8_t y) return x = (T)(x & ~((T)1U << y)); } -/** - * Clears several bits in a variable. - * - * This macro clears several bits in a variable. The bits to clear are - * provided by a value. The new value is also returned. - * - * @param x The variable to clear some bits - * @param y The value with set bits for clearing them in the variable - * @return The new value of x - */ -#define CLRBITS(x, y) ((x) &= ~(y)) - /** * Toggles a bit in a variable. * diff --git a/src/road_cmd.cpp b/src/road_cmd.cpp index 2d9a6d2de5..35cd09a614 100644 --- a/src/road_cmd.cpp +++ b/src/road_cmd.cpp @@ -540,7 +540,7 @@ static CommandCost RemoveRoad(TileIndex tile, DoCommandFlags flags, RoadBits pie static CommandCost CheckRoadSlope(Slope tileh, RoadBits *pieces, RoadBits existing, RoadBits other) { /* Remove already build pieces */ - CLRBITS(*pieces, existing); + *pieces &= ~existing; /* If we can't build anything stop here */ if (*pieces == ROAD_NONE) return CMD_ERROR;