Eliminate dead code.

* fixes #822
This commit is contained in:
Howard Hinnant 2024-04-15 10:03:38 -04:00
parent 575fc23c3c
commit cd3c57932f

View File

@ -7748,9 +7748,7 @@ from_stream(std::basic_istream<CharT, Traits>& is, const CharT* fmt,
year_month_day ymd_trial = sys_days(year{Y}/January/Sunday[1]) +
weeks{U-1} +
(weekday{static_cast<unsigned>(wd)} - Sunday);
if (Y == not_a_year)
Y = static_cast<int>(ymd_trial.year());
else if (year{Y} != ymd_trial.year())
if (year{Y} != ymd_trial.year())
goto broken;
if (m == not_a_month)
m = static_cast<int>(static_cast<unsigned>(ymd_trial.month()));
@ -7767,9 +7765,7 @@ from_stream(std::basic_istream<CharT, Traits>& is, const CharT* fmt,
year_month_day ymd_trial = sys_days(year{Y}/January/Monday[1]) +
weeks{W-1} +
(weekday{static_cast<unsigned>(wd)} - Monday);
if (Y == not_a_year)
Y = static_cast<int>(ymd_trial.year());
else if (year{Y} != ymd_trial.year())
if (year{Y} != ymd_trial.year())
goto broken;
if (m == not_a_month)
m = static_cast<int>(static_cast<unsigned>(ymd_trial.month()));