Skip to content

Commit

Permalink
Fix unsigned / signed conversion
Browse files Browse the repository at this point in the history
gregorian_calendar::end_of_month_day returns unsigned short and date constructor uses unsigned short too.
  • Loading branch information
LE GARREC Vincent authored and jeking3 committed May 10, 2019
1 parent 345abc6 commit 29bb209
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/boost/date_time/gregorian/greg_date.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ namespace gregorian {
date end_of_month() const
{
ymd_type ymd = year_month_day();
short eom_day = gregorian_calendar::end_of_month_day(ymd.year, ymd.month);
unsigned short eom_day = gregorian_calendar::end_of_month_day(ymd.year, ymd.month);
return date(ymd.year, ymd.month, eom_day);
}

Expand Down

0 comments on commit 29bb209

Please sign in to comment.