Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix assert in diary info panel clamp #73758

Merged
merged 1 commit into from
May 14, 2024
Merged

Conversation

mischief
Copy link
Contributor

Summary

Bugfixes "fix assert in diary info panel clamp"

Purpose of change

with -D_GLIBCXX_ASSERTIONS=1, libstdc++ will assert when lo > hi in std::clamp, and it is described as undefined behavior in https://en.cppreference.com/w/cpp/algorithm/clamp. fix the arguments to avoid it.

Describe the solution

Describe alternatives you've considered

Testing

Additional context

@github-actions github-actions bot added Info / User Interface Game - player communication, menus, etc. [C++] Changes (can be) made in C++. Previously named `Code` <Bugfix> This is a fix for a bug (or closes open issue) astyled astyled PR, label is assigned by github actions json-styled JSON lint passed, label assigned by github actions labels May 14, 2024
with -D_GLIBCXX_ASSERTIONS=1, libstdc++ will assert when `lo > hi` in
std::clamp, and it is described as undefined behavior in
https://en.cppreference.com/w/cpp/algorithm/clamp. fix the arguments to
avoid it.
@github-actions github-actions bot added the BasicBuildPassed This PR builds correctly, label assigned by github actions label May 14, 2024
@dseguin dseguin merged commit 4b658e3 into CleverRaven:master May 14, 2024
21 of 26 checks passed
@mischief mischief deleted the diary-clamp branch May 14, 2024 23:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
astyled astyled PR, label is assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions <Bugfix> This is a fix for a bug (or closes open issue) [C++] Changes (can be) made in C++. Previously named `Code` Info / User Interface Game - player communication, menus, etc. json-styled JSON lint passed, label assigned by github actions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants