mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-29 09:44:52 +01:00
* Fix #12402: Refactor MEASUREMENT_FORMAT to use strong enum * Remove redundant default branches Co-authored-by: Matt Thomson <matt-thomson@users.noreply.github.com>
This commit is contained in:
@@ -308,23 +308,23 @@ uint8_t platform_get_locale_currency()
|
||||
return platform_get_currency_value(currCode);
|
||||
}
|
||||
|
||||
uint8_t platform_get_locale_measurement_format()
|
||||
MeasurementFormat platform_get_locale_measurement_format()
|
||||
{
|
||||
UINT measurement_system;
|
||||
if (GetLocaleInfo(
|
||||
LOCALE_USER_DEFAULT, LOCALE_IMEASURE | LOCALE_RETURN_NUMBER, (LPSTR)&measurement_system, sizeof(measurement_system))
|
||||
== 0)
|
||||
{
|
||||
return MEASUREMENT_FORMAT_METRIC;
|
||||
return MeasurementFormat::Metric;
|
||||
}
|
||||
|
||||
switch (measurement_system)
|
||||
{
|
||||
case 1:
|
||||
return MEASUREMENT_FORMAT_IMPERIAL;
|
||||
return MeasurementFormat::Imperial;
|
||||
case 0:
|
||||
default:
|
||||
return MEASUREMENT_FORMAT_METRIC;
|
||||
return MeasurementFormat::Metric;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user