diff options
author | Lioncash <mathew1800@gmail.com> | 2020-07-15 19:45:20 +0200 |
---|---|---|
committer | Lioncash <mathew1800@gmail.com> | 2020-07-15 19:45:22 +0200 |
commit | af5a56ddc4454fe81183b940c73038909189cf6f (patch) | |
tree | efabea58cda5d6a1d32576daf661adafe4dcd548 | |
parent | settings: Make use of std::string_view over std::string for logging (diff) | |
download | yuzu-af5a56ddc4454fe81183b940c73038909189cf6f.tar yuzu-af5a56ddc4454fe81183b940c73038909189cf6f.tar.gz yuzu-af5a56ddc4454fe81183b940c73038909189cf6f.tar.bz2 yuzu-af5a56ddc4454fe81183b940c73038909189cf6f.tar.lz yuzu-af5a56ddc4454fe81183b940c73038909189cf6f.tar.xz yuzu-af5a56ddc4454fe81183b940c73038909189cf6f.tar.zst yuzu-af5a56ddc4454fe81183b940c73038909189cf6f.zip |
-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 = {}; 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() { |