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

Codechange: replace INVALID_X with XID::Invalid() for PoolIDs

This commit is contained in:
Rubidium
2025-02-16 19:29:53 +01:00
committed by rubidium42
parent d13b0e0813
commit fd4adc55e3
157 changed files with 744 additions and 772 deletions

View File

@@ -197,12 +197,12 @@ public:
void OnInvalidateData([[maybe_unused]] int data = 0, [[maybe_unused]] bool gui_scope = true) override
{
/* If company gets shut down, while displaying an error about it, remove the error message. */
if (this->company != INVALID_COMPANY && !Company::IsValidID(this->company)) this->Close();
if (this->company != CompanyID::Invalid() && !Company::IsValidID(this->company)) this->Close();
}
void SetStringParameters(WidgetID widget) const override
{
if (widget == WID_EM_CAPTION && this->company != INVALID_COMPANY) SetDParam(0, this->company);
if (widget == WID_EM_CAPTION && this->company != CompanyID::Invalid()) SetDParam(0, this->company);
}
void DrawWidget(const Rect &r, WidgetID widget) const override