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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

@ -1 +1 @@
Subproject commit e7e1482087f58913b80a20b04d5c58d9d6d90155 Subproject commit cac99da8dc88be719a728dc1b597b0ac307c1800

View File

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