diff options
author | bunnei <bunneidev@gmail.com> | 2022-05-29 11:33:24 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-29 11:33:24 +0200 |
commit | 1c8b509441c63e14b05729ac9f38af89c20f5fe3 (patch) | |
tree | 02f6de35ec91c4f7d9749f6e791d136103c1c8f8 /src/core | |
parent | Merge pull request #8339 from Docteh/about_icon (diff) | |
parent | time_zone_manager: Use s8 for month length tables (diff) | |
download | yuzu-1c8b509441c63e14b05729ac9f38af89c20f5fe3.tar yuzu-1c8b509441c63e14b05729ac9f38af89c20f5fe3.tar.gz yuzu-1c8b509441c63e14b05729ac9f38af89c20f5fe3.tar.bz2 yuzu-1c8b509441c63e14b05729ac9f38af89c20f5fe3.tar.lz yuzu-1c8b509441c63e14b05729ac9f38af89c20f5fe3.tar.xz yuzu-1c8b509441c63e14b05729ac9f38af89c20f5fe3.tar.zst yuzu-1c8b509441c63e14b05729ac9f38af89c20f5fe3.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/hle/service/time/time_zone_manager.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/core/hle/service/time/time_zone_manager.cpp b/src/core/hle/service/time/time_zone_manager.cpp index 449a5ac96..eeec34436 100644 --- a/src/core/hle/service/time/time_zone_manager.cpp +++ b/src/core/hle/service/time/time_zone_manager.cpp @@ -110,10 +110,9 @@ static constexpr s64 GetLeapDaysFromYear(s64 year) { } } -static constexpr int GetMonthLength(bool is_leap_year, int month) { - constexpr std::array<int, 12> month_lengths{31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; - constexpr std::array<int, 12> month_lengths_leap{31, 29, 31, 30, 31, 30, - 31, 31, 30, 31, 30, 31}; +static constexpr s8 GetMonthLength(bool is_leap_year, int month) { + constexpr std::array<s8, 12> month_lengths{31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; + constexpr std::array<s8, 12> month_lengths_leap{31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; return is_leap_year ? month_lengths_leap[month] : month_lengths[month]; } |