Codechange: just pass the SettingDesc to SetSettingValue and remove distinction between (non)company

This commit is contained in:
rubidium42
2021-05-18 20:57:44 +02:00
committed by rubidium42
parent db54e20825
commit 8ffb4122df
6 changed files with 54 additions and 83 deletions

View File

@@ -253,8 +253,7 @@ static_assert(lengthof(_news_type_data) == NT_END);
*/
NewsDisplay NewsTypeData::GetDisplay() const
{
uint index;
const SettingDesc *sd = GetSettingFromName(this->name, &index);
const SettingDesc *sd = GetSettingFromName(this->name);
assert(sd != nullptr);
void *ptr = GetVariableAddress(nullptr, &sd->save);
return (NewsDisplay)ReadValue(ptr, sd->save.conv);