diff options
Diffstat (limited to '')
| -rw-r--r-- | src/core/settings.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/core/settings.cpp b/src/core/settings.cpp index 74d558284..eb39e81da 100644 --- a/src/core/settings.cpp +++ b/src/core/settings.cpp | |||
| @@ -67,18 +67,18 @@ Values values = {}; | |||
| 67 | bool configuring_global = true; | 67 | bool configuring_global = true; |
| 68 | 68 | ||
| 69 | std::string GetTimeZoneString() { | 69 | std::string GetTimeZoneString() { |
| 70 | static constexpr std::array<const char*, 46> timezones{{ | 70 | static constexpr std::array timezones{ |
| 71 | "auto", "default", "CET", "CST6CDT", "Cuba", "EET", "Egypt", "Eire", | 71 | "auto", "default", "CET", "CST6CDT", "Cuba", "EET", "Egypt", "Eire", |
| 72 | "EST", "EST5EDT", "GB", "GB-Eire", "GMT", "GMT+0", "GMT-0", "GMT0", | 72 | "EST", "EST5EDT", "GB", "GB-Eire", "GMT", "GMT+0", "GMT-0", "GMT0", |
| 73 | "Greenwich", "Hongkong", "HST", "Iceland", "Iran", "Israel", "Jamaica", "Japan", | 73 | "Greenwich", "Hongkong", "HST", "Iceland", "Iran", "Israel", "Jamaica", "Japan", |
| 74 | "Kwajalein", "Libya", "MET", "MST", "MST7MDT", "Navajo", "NZ", "NZ-CHAT", | 74 | "Kwajalein", "Libya", "MET", "MST", "MST7MDT", "Navajo", "NZ", "NZ-CHAT", |
| 75 | "Poland", "Portugal", "PRC", "PST8PDT", "ROC", "ROK", "Singapore", "Turkey", | 75 | "Poland", "Portugal", "PRC", "PST8PDT", "ROC", "ROK", "Singapore", "Turkey", |
| 76 | "UCT", "Universal", "UTC", "W-SU", "WET", "Zulu", | 76 | "UCT", "Universal", "UTC", "W-SU", "WET", "Zulu", |
| 77 | }}; | 77 | }; |
| 78 | |||
| 79 | ASSERT(Settings::values.time_zone_index.GetValue() < timezones.size()); | ||
| 80 | 78 | ||
| 81 | return timezones[Settings::values.time_zone_index.GetValue()]; | 79 | const auto time_zone_index = static_cast<std::size_t>(values.time_zone_index.GetValue()); |
| 80 | ASSERT(time_zone_index < timezones.size()); | ||
| 81 | return timezones[time_zone_index]; | ||
| 82 | } | 82 | } |
| 83 | 83 | ||
| 84 | void Apply() { | 84 | void Apply() { |