1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-19 20:49:11 +00:00

Codechange: Use std::map to provide indexed widget access.

This removes the need to determine the biggest widget index and replaces C-style memory handling.
This commit is contained in:
2023-10-16 11:13:36 +01:00
committed by Peter Nelson
parent a12f426d69
commit b86182ab84
16 changed files with 147 additions and 209 deletions

View File

@@ -855,9 +855,8 @@ GUIGameServerList::FilterFunction * const NetworkGameWindow::filter_funcs[] = {
&NGameSearchFilter
};
static NWidgetBase *MakeResizableHeader(int *biggest_index)
static NWidgetBase *MakeResizableHeader()
{
*biggest_index = std::max<int>(*biggest_index, WID_NG_INFO);
return new NWidgetServerListHeader();
}