Codechange: Add __FILE__/__LINE__ of WindowDesc to WindowDesc.

This is to allow unit-tests to produce more useful output.
This commit is contained in:
Peter Nelson
2023-11-02 19:33:01 +00:00
committed by Peter Nelson
parent 873f93cab1
commit 18fb8e153f
63 changed files with 161 additions and 153 deletions

View File

@@ -538,7 +538,7 @@ struct CompanyFinancesWindow : Window {
/** First conservative estimate of the maximum amount of money */
Money CompanyFinancesWindow::max_money = INT32_MAX;
static WindowDesc _company_finances_desc(
static WindowDesc _company_finances_desc(__FILE__, __LINE__,
WDP_AUTO, "company_finances", 0, 0,
WC_FINANCES, WC_NONE,
0,
@@ -1156,7 +1156,7 @@ static const NWidgetPart _nested_select_company_livery_widgets [] = {
EndContainer(),
};
static WindowDesc _select_company_livery_desc(
static WindowDesc _select_company_livery_desc(__FILE__, __LINE__,
WDP_AUTO, nullptr, 0, 0,
WC_COMPANY_COLOUR, WC_NONE,
0,
@@ -1773,7 +1773,7 @@ public:
};
/** Company manager face selection window description */
static WindowDesc _select_company_manager_face_desc(
static WindowDesc _select_company_manager_face_desc(__FILE__, __LINE__,
WDP_AUTO, nullptr, 0, 0,
WC_COMPANY_MANAGER_FACE, WC_NONE,
WDF_CONSTRUCTION,
@@ -2145,7 +2145,7 @@ struct CompanyInfrastructureWindow : Window
}
};
static WindowDesc _company_infrastructure_desc(
static WindowDesc _company_infrastructure_desc(__FILE__, __LINE__,
WDP_AUTO, "company_infrastructure", 0, 0,
WC_COMPANY_INFRASTRUCTURE, WC_NONE,
0,
@@ -2682,7 +2682,7 @@ struct CompanyWindow : Window
}
};
static WindowDesc _company_desc(
static WindowDesc _company_desc(__FILE__, __LINE__,
WDP_AUTO, "company", 0, 0,
WC_COMPANY, WC_NONE,
0,
@@ -2816,7 +2816,7 @@ static const NWidgetPart _nested_buy_company_widgets[] = {
EndContainer(),
};
static WindowDesc _buy_company_desc(
static WindowDesc _buy_company_desc(__FILE__, __LINE__,
WDP_AUTO, nullptr, 0, 0,
WC_BUY_COMPANY, WC_NONE,
WDF_CONSTRUCTION,