diff options
author | Patric Stout <truebrain@openttd.org> | 2021-06-03 16:55:08 +0200 |
---|---|---|
committer | Patric Stout <github@truebrain.nl> | 2021-06-03 17:30:00 +0200 |
commit | 28e90769f74e55ea7c8f75146d5b33e0aa777da8 (patch) | |
tree | eeff0974346ef9da7cbc2b33b040d016c341ff0b /src/tunnelbridge_cmd.cpp | |
parent | f8dd5dd00a7aa3cc5769b4bce0a1b7a63073c8ce (diff) | |
download | openttd-28e90769f74e55ea7c8f75146d5b33e0aa777da8.tar.xz |
Codechange: use "[[maybe_unused]]" instead of a wide variety of other ways we had
While at it, replace OTTD_ASSERT with WITH_ASSERT, as this
is always set if assert() is valid. No matter if NDEBUG is set
or not.
Diffstat (limited to 'src/tunnelbridge_cmd.cpp')
-rw-r--r-- | src/tunnelbridge_cmd.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/tunnelbridge_cmd.cpp b/src/tunnelbridge_cmd.cpp index 05ad1025e..5181dfdca 100644 --- a/src/tunnelbridge_cmd.cpp +++ b/src/tunnelbridge_cmd.cpp @@ -1846,8 +1846,7 @@ static void ChangeTileOwner_TunnelBridge(TileIndex tile, Owner old_owner, Owner if (tt == TRANSPORT_RAIL) { /* Since all of our vehicles have been removed, it is safe to remove the rail * bridge / tunnel. */ - CommandCost ret = DoCommand(tile, 0, 0, DC_EXEC | DC_BANKRUPT, CMD_LANDSCAPE_CLEAR); - (void)ret; // assert only + [[maybe_unused]] CommandCost ret = DoCommand(tile, 0, 0, DC_EXEC | DC_BANKRUPT, CMD_LANDSCAPE_CLEAR); assert(ret.Succeeded()); } else { /* In any other case, we can safely reassign the ownership to OWNER_NONE. */ |