Merge pull request #9028 from liamwhite/wtype-limits

nfp_types: silence -Wtype-limits
master
Narr the Reg 2022-10-07 09:03:35 +07:00 committed by GitHub
commit b8777b6653
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

@ -167,7 +167,7 @@ struct AmiiboDate {
bool IsValidDate() const { bool IsValidDate() const {
const bool is_day_valid = GetDay() > 0 && GetDay() < 32; const bool is_day_valid = GetDay() > 0 && GetDay() < 32;
const bool is_month_valid = GetMonth() >= 0 && GetMonth() < 13; const bool is_month_valid = GetMonth() > 0 && GetMonth() < 13;
const bool is_year_valid = GetYear() >= 2000; const bool is_year_valid = GetYear() >= 2000;
return is_year_valid && is_month_valid && is_day_valid; return is_year_valid && is_month_valid && is_day_valid;
} }