mirror of
https://github.com/OpenTTD/OpenTTD
synced 2026-01-22 03:42:41 +01:00
Codechange: Use std::vector for GRFConfig lists. (#10835)
This replaces the C-style custom managed linked-list and allows use of iterators etc.
This commit is contained in:
@@ -585,8 +585,8 @@ public:
|
||||
|
||||
/* 'NewGRF Settings' button invisible if no NewGRF is used */
|
||||
bool changed = false;
|
||||
changed |= this->GetWidget<NWidgetStacked>(WID_NG_NEWGRF_SEL)->SetDisplayedPlane(sel == nullptr || sel->status != NGLS_ONLINE || sel->info.grfconfig == nullptr ? SZSP_NONE : 0);
|
||||
changed |= this->GetWidget<NWidgetStacked>(WID_NG_NEWGRF_MISSING_SEL)->SetDisplayedPlane(sel == nullptr || sel->status != NGLS_ONLINE || sel->info.grfconfig == nullptr || !sel->info.version_compatible || sel->info.compatible ? SZSP_NONE : 0);
|
||||
changed |= this->GetWidget<NWidgetStacked>(WID_NG_NEWGRF_SEL)->SetDisplayedPlane(sel == nullptr || sel->status != NGLS_ONLINE || sel->info.grfconfig.empty() ? SZSP_NONE : 0);
|
||||
changed |= this->GetWidget<NWidgetStacked>(WID_NG_NEWGRF_MISSING_SEL)->SetDisplayedPlane(sel == nullptr || sel->status != NGLS_ONLINE || sel->info.grfconfig.empty() || !sel->info.version_compatible || sel->info.compatible ? SZSP_NONE : 0);
|
||||
if (changed) {
|
||||
this->ReInit();
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user