mirror of https://github.com/OpenTTD/OpenTTD
(svn r12420) -Cleanup: Fix the indentation, improve a variable name, and add a NOT_REACHED to DeterminePluralForm.
parent
82eebc20c0
commit
97fb7fb8d9
|
@ -400,19 +400,20 @@ static char *FormatGenericCurrency(char *buff, const CurrencySpec *spec, Money n
|
||||||
return buff;
|
return buff;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int DeterminePluralForm(int64 cnt)
|
static int DeterminePluralForm(int64 count)
|
||||||
{
|
{
|
||||||
uint64 n = cnt;
|
|
||||||
/* The absolute value determines plurality */
|
/* The absolute value determines plurality */
|
||||||
if (cnt < 0) n = -cnt;
|
uint64 n = abs(count);
|
||||||
|
|
||||||
switch (_langpack->plural_form) {
|
switch (_langpack->plural_form) {
|
||||||
|
default:
|
||||||
|
NOT_REACHED();
|
||||||
|
|
||||||
/* Two forms, singular used for one only
|
/* Two forms, singular used for one only
|
||||||
* Used in:
|
* Used in:
|
||||||
* Danish, Dutch, English, German, Norwegian, Swedish, Estonian, Finnish,
|
* Danish, Dutch, English, German, Norwegian, Swedish, Estonian, Finnish,
|
||||||
* Greek, Hebrew, Italian, Portuguese, Spanish, Esperanto */
|
* Greek, Hebrew, Italian, Portuguese, Spanish, Esperanto */
|
||||||
case 0:
|
case 0:
|
||||||
default:
|
|
||||||
return n != 1;
|
return n != 1;
|
||||||
|
|
||||||
/* Only one form
|
/* Only one form
|
||||||
|
|
Loading…
Reference in New Issue