MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / GetSaveLoadFromSettingTable

Function GetSaveLoadFromSettingTable

src/settings.cpp:1665–1672  ·  view source on GitHub ↗

* Get the SaveLoad for all settings in the settings table. * @param settings The settings table to get the SaveLoad objects from. * @param saveloads A vector to store the result in. */

Source from the content-addressed store, hash-verified

1663 * @param saveloads A vector to store the result in.
1664 */
1665void GetSaveLoadFromSettingTable(SettingTable settings, std::vector<SaveLoad> &saveloads)
1666{
1667 for (auto &desc : settings) {
1668 const SettingDesc *sd = GetSettingDesc(desc);
1669 if (!SlIsObjectCurrentlyValid(sd->save.version_from, sd->save.version_to)) continue;
1670 saveloads.push_back(sd->save);
1671 }
1672}
1673
1674/**
1675 * Create a single table with all settings that should be stored/loaded

Callers 1

GetLinkGraphJobDescFunction · 0.85

Calls 3

GetSettingDescFunction · 0.85
SlIsObjectCurrentlyValidFunction · 0.85
push_backMethod · 0.80

Tested by

no test coverage detected