mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-12-23 08:50:57 +01:00
settings: Resolve a sign conversion warning within GetTimeZoneString()
A sign conversion warning was occurring due to an int < size_t comparison.
This commit is contained in:
parent
5dbf91d739
commit
af5a56ddc4
1 changed files with 5 additions and 5 deletions
|
@ -67,18 +67,18 @@ Values values = {};
|
|||
bool configuring_global = true;
|
||||
|
||||
std::string GetTimeZoneString() {
|
||||
static constexpr std::array<const char*, 46> timezones{{
|
||||
static constexpr std::array timezones{
|
||||
"auto", "default", "CET", "CST6CDT", "Cuba", "EET", "Egypt", "Eire",
|
||||
"EST", "EST5EDT", "GB", "GB-Eire", "GMT", "GMT+0", "GMT-0", "GMT0",
|
||||
"Greenwich", "Hongkong", "HST", "Iceland", "Iran", "Israel", "Jamaica", "Japan",
|
||||
"Kwajalein", "Libya", "MET", "MST", "MST7MDT", "Navajo", "NZ", "NZ-CHAT",
|
||||
"Poland", "Portugal", "PRC", "PST8PDT", "ROC", "ROK", "Singapore", "Turkey",
|
||||
"UCT", "Universal", "UTC", "W-SU", "WET", "Zulu",
|
||||
}};
|
||||
};
|
||||
|
||||
ASSERT(Settings::values.time_zone_index.GetValue() < timezones.size());
|
||||
|
||||
return timezones[Settings::values.time_zone_index.GetValue()];
|
||||
const auto time_zone_index = static_cast<std::size_t>(values.time_zone_index.GetValue());
|
||||
ASSERT(time_zone_index < timezones.size());
|
||||
return timezones[time_zone_index];
|
||||
}
|
||||
|
||||
void Apply() {
|
||||
|
|
Loading…
Reference in a new issue