mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-29 09:44:52 +01:00
Refactor TEMPERATURE_FORMAT to use strong enum (#12610)
* Refactor TEMPERATURE_FORMAT to use strong enum * Rename TEMPERATURE_FORMAT to TemperatureFormat * Rename TemperatureFormat to TempueratureUnit
This commit is contained in:
@@ -328,7 +328,7 @@ uint8_t platform_get_locale_measurement_format()
|
||||
}
|
||||
}
|
||||
|
||||
uint8_t platform_get_locale_temperature_format()
|
||||
TemperatureUnit platform_get_locale_temperature_format()
|
||||
{
|
||||
UINT fahrenheit;
|
||||
|
||||
@@ -337,13 +337,13 @@ uint8_t platform_get_locale_temperature_format()
|
||||
if (GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_IMEASURE | LOCALE_RETURN_NUMBER, (LPSTR)&fahrenheit, sizeof(fahrenheit)) == 0)
|
||||
{
|
||||
// Assume celsius by default if function call fails
|
||||
return TEMPERATURE_FORMAT_C;
|
||||
return TemperatureUnit::Celsius;
|
||||
}
|
||||
|
||||
if (fahrenheit)
|
||||
return TEMPERATURE_FORMAT_F;
|
||||
return TemperatureUnit::Fahrenheit;
|
||||
else
|
||||
return TEMPERATURE_FORMAT_C;
|
||||
return TemperatureUnit::Celsius;
|
||||
}
|
||||
|
||||
uint8_t platform_get_locale_date_format()
|
||||
|
||||
Reference in New Issue
Block a user