Remove SUPPRESS_UNUSED, duplicate isSoldierJob and fix CMake version range issues - #1972
Open
Flamefire wants to merge 6 commits into
Open
Remove SUPPRESS_UNUSED, duplicate isSoldierJob and fix CMake version range issues#1972Flamefire wants to merge 6 commits into
SUPPRESS_UNUSED, duplicate isSoldierJob and fix CMake version range issues#1972Flamefire wants to merge 6 commits into
Conversation
Flamefire
force-pushed
the
unused-cleanup
branch
3 times, most recently
from
August 26, 2026 13:07
d96286f to
f51d6bb
Compare
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
Flamefire
force-pushed
the
unused-cleanup
branch
from
August 28, 2026 08:23
f51d6bb to
101463b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Main change is the removal of our warning supression macro
SUPPRESS_UNUSEDwhich in C++17 can be replaced by[[maybe_unused]]attributes are simply usingcontexprfor constants, so done that.To avoid conflicts 2 more changes are included:
The
cmake_minimum_requiredcommand requires 3 dots as the range separator.This was wrong over all submodules.
-> submodule update would conflict
isSoldierwas the same asisSoldierJobas the former is called with a job enum the shorter name is enough.