Use c_encoding function for datatype conversion (#5)

* Use c_encoding function 

The MSVC compiler does not accept direct conversion from weekday datatype (used in the date.h dependency) to unsigned int used in the DayOfWeek Enum. However, the c_encoding function gives the necessary datatype conversion.

* Updated submodule libcron/externals/date

Co-authored-by: Heinz-Peter Liechtenecker <h.liechtenecker@fh-kaernten.at>
This commit is contained in:
Heinz-Peter Liechtenecker
2020-06-30 19:07:58 +02:00
committed by GitHub
parent b82267acca
commit 440f5099ba
2 changed files with 2 additions and 2 deletions

View File

@ -46,7 +46,7 @@ namespace libcron
//Add days until the current weekday is one of the allowed weekdays
year_month_weekday ymw = date::floor<days>(curr);
if (data.get_day_of_week().find(static_cast<DayOfWeek>(unsigned(ymw.weekday()))) ==
if (data.get_day_of_week().find(static_cast<DayOfWeek>(ymw.weekday().c_encoding())) ==
data.get_day_of_week().end())
{
sys_days s = ymd;