Part of #21421: refactor CURRENCY_RATE_MAX_NUM_DIGITS

This commit is contained in:
Claudio Tiecher 2024-03-31 21:21:48 +02:00
parent f698fbfc54
commit 345b9a935f
2 changed files with 2 additions and 2 deletions

View File

@ -122,7 +122,7 @@ static Widget window_custom_currency_widgets[] = {
WindowTextInputOpen(
this, WIDX_RATE, STR_RATE_INPUT_TITLE, STR_RATE_INPUT_DESC, {}, STR_FORMAT_INTEGER,
static_cast<uint32_t>(CurrencyDescriptors[EnumValue(CurrencyType::Custom)].rate),
CURRENCY_RATE_MAX_NUM_DIGITS);
kCurrencyRateMaxNumDigits);
break;
}
}

View File

@ -46,7 +46,7 @@ enum class CurrencyAffix
};
constexpr size_t kCurrencySymbolMaxSize = 8;
#define CURRENCY_RATE_MAX_NUM_DIGITS 9
constexpr size_t kCurrencyRateMaxNumDigits = 9;
// Currency format specification - inspired by OpenTTD
struct CurrencyDescriptor