Codechange: Replace currency macros with functions. (#12396)

This commit is contained in:
Peter Nelson
2024-03-29 14:49:48 +00:00
committed by GitHub
parent e21c12afeb
commit 8d312b305b
8 changed files with 59 additions and 45 deletions

View File

@@ -2568,7 +2568,7 @@ struct CompanyWindow : Window
default: NOT_REACHED();
case WID_C_GIVE_MONEY: {
Money money = std::strtoull(str, nullptr, 10) / _currency->rate;
Money money = std::strtoull(str, nullptr, 10) / GetCurrency().rate;
Command<CMD_GIVE_MONEY>::Post(STR_ERROR_CAN_T_GIVE_MONEY, money, (CompanyID)this->window_number);
break;
}