Skip to content

Commit

Permalink
Fix #336: quiet warnings in cDate::parseDateIso8601()
Browse files Browse the repository at this point in the history
  • Loading branch information
terrillmoore committed Jun 12, 2022
1 parent 0108bff commit be168d8
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/lib/Catena_Date.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,11 @@ bool cDate::parseDateIso8601(
return false;
if (nYear == 2)
nYear += 2000;
if (! (kMinYear <= year && year <= kMaxYear))
static_assert(
kMinYear == std::numeric_limits<decltype(year)>::min(),
"code assumes kMinYear is lower limit of year"
);
if (! (/* kMinYear <= year && */ year <= kMaxYear))
return false;

/* consume year and '-' */
Expand Down

0 comments on commit be168d8

Please sign in to comment.