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

Change: Use default value for invalid settings instead of clamping to min or max value. #7361

Merged
merged 3 commits into from Mar 16, 2019

Conversation

@PeterN
Copy link
Member

PeterN commented Mar 10, 2019

  • If the range of a setting is reduced, the value is now reset to the default value instead clamp.
  • Fixes uint32 values between 0 and min_value being accepted instead of clamped (oops, this one should maybe be separated.)
  • Breaks regression as the regression save has an absurdly high max_load value, which is now reset to 300k instead of clamped to 500k...
@PeterN PeterN mentioned this pull request Mar 16, 2019
@PeterN
Copy link
Member Author

PeterN commented Mar 16, 2019

  • Changed so that only "multi-string" settings are reset. These are the settings that have a drop down choice.
  • Other value-types are clamped, as they are master.
@PeterN PeterN marked this pull request as ready for review Mar 16, 2019
src/settings.cpp Show resolved Hide resolved
@LordAro LordAro merged commit bcfc962 into OpenTTD:master Mar 16, 2019
8 checks passed
8 checks passed
OpenTTD CI Build #20190316.9 succeeded
Details
OpenTTD CI (Linux commit-checker) Linux commit-checker succeeded
Details
OpenTTD CI (Linux linux-amd64-clang-3.8) Linux linux-amd64-clang-3.8 succeeded
Details
OpenTTD CI (Linux linux-amd64-gcc-6) Linux linux-amd64-gcc-6 succeeded
Details
OpenTTD CI (Linux linux-i386-gcc-6) Linux linux-i386-gcc-6 succeeded
Details
OpenTTD CI (MacOS) MacOS succeeded
Details
OpenTTD CI (Windows Win32) Windows Win32 succeeded
Details
OpenTTD CI (Windows Win64) Windows Win64 succeeded
Details
douiwby added a commit to douiwby/OpenTTD that referenced this pull request Apr 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.