Skip to content

Remove SUPPRESS_UNUSED, duplicate isSoldierJob and fix CMake version range issues - #1972

Open
Flamefire wants to merge 6 commits into
Return-To-The-Roots:masterfrom
Flamefire:unused-cleanup
Open

Remove SUPPRESS_UNUSED, duplicate isSoldierJob and fix CMake version range issues#1972
Flamefire wants to merge 6 commits into
Return-To-The-Roots:masterfrom
Flamefire:unused-cleanup

Conversation

@Flamefire

Copy link
Copy Markdown
Member

Main change is the removal of our warning supression macro SUPPRESS_UNUSED which in C++17 can be replaced by [[maybe_unused]] attributes are simply using contexpr for constants, so done that.

To avoid conflicts 2 more changes are included:

The cmake_minimum_required command requires 3 dots as the range separator.
This was wrong over all submodules.
-> submodule update would conflict

isSoldier was the same as isSoldierJob as the former is called with a job enum the shorter name is enough.

@Flamefire
Flamefire force-pushed the unused-cleanup branch 3 times, most recently from d96286f to f51d6bb Compare August 26, 2026 13:07
@Flamefire
Flamefire requested a review from Flow86 August 28, 2026 08:23
C++17 introduced `std::clamp` which makes passing a type from std
namespace (such as chrono-types) ambiguous in the semi-recursive call.
Use constexpr-ifs and `std::clamp` in the final path.
It's the same as `isSoldier` so rename/remove it.
- Use `constexpr` instead of `const`
- Use `[[maybe_unused]]` where applicable
- Remove includes
- Also shorten array-types to use CTAD instead of specifying the template params explicitely
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant