* Set the company settings for a new company to their default values. */
| 1855 | * Set the company settings for a new company to their default values. |
| 1856 | */ |
| 1857 | void SetDefaultCompanySettings(CompanyID cid) |
| 1858 | { |
| 1859 | Company *c = Company::Get(cid); |
| 1860 | AutoRestoreBackup backup(_current_company, cid); |
| 1861 | for (auto &desc : _company_settings) { |
| 1862 | const IntSettingDesc *int_setting = GetSettingDesc(desc)->AsIntSetting(); |
| 1863 | int_setting->MakeValueValidAndWrite(&c->settings, int_setting->GetDefaultValue()); |
| 1864 | } |
| 1865 | } |
| 1866 | |
| 1867 | /** |
| 1868 | * Sync all company settings in a multiplayer game. |
no test coverage detected