Codechange: roughly half number of strings for settings #9422
+68
−63
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.
Motivation / Problem
The SettingDesc structure has two strings for the name. One directly in SettingDesc and one in its contained SaveLoad. For all intents and purposes the string in the SaveLoad is (going to be) the same as the one in the SettingDesc; there is code to copy the name from SettingDesc to SaveLoad when the SettingDesc name is not empty.
So, only when the name of a setting is empty SaveLoad's name is actually used. Setting a name for those few ones with an empty name means we can just write the Setting name in the SaveLoad's name field and stop copying the SettingDesc name to the SaveLoad at a later time.
Description
SettingDesc
and save than name in `SaveLoad``.Limitations
None.
The name of five settings is changed, including in the compat layer. However, these are only used for old savegames so setting these names has no effect on savegame compatibility.
Checklist for review
Some things are not automated, and forgotten often. This list is a reminder for the reviewers.