MCPcopy Create free account
hub / github.com/comaps/comaps / MakeOpeningDays

Function MakeOpeningDays

libs/editor/ui2oh.cpp:17–38  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

15osmoh::Timespan const kTwentyFourHours = {0_h, 24_h};
16
17editor::ui::OpeningDays MakeOpeningDays(osmoh::Weekdays const & wds)
18{
19 std::set<osmoh::Weekday> openingDays;
20 for (auto const & wd : wds.GetWeekdayRanges())
21 {
22 if (wd.HasSunday())
23 openingDays.insert(osmoh::Weekday::Sunday);
24 if (wd.HasMonday())
25 openingDays.insert(osmoh::Weekday::Monday);
26 if (wd.HasTuesday())
27 openingDays.insert(osmoh::Weekday::Tuesday);
28 if (wd.HasWednesday())
29 openingDays.insert(osmoh::Weekday::Wednesday);
30 if (wd.HasThursday())
31 openingDays.insert(osmoh::Weekday::Thursday);
32 if (wd.HasFriday())
33 openingDays.insert(osmoh::Weekday::Friday);
34 if (wd.HasSaturday())
35 openingDays.insert(osmoh::Weekday::Saturday);
36 }
37 return openingDays;
38}
39
40void SetUpWeekdays(osmoh::Weekdays const & wds, editor::ui::TimeTable & tt)
41{

Callers 2

SetUpWeekdaysFunction · 0.85
ExcludeRulePartFunction · 0.85

Calls 8

HasSundayMethod · 0.80
HasMondayMethod · 0.80
HasTuesdayMethod · 0.80
HasWednesdayMethod · 0.80
HasThursdayMethod · 0.80
HasFridayMethod · 0.80
HasSaturdayMethod · 0.80
insertMethod · 0.45

Tested by

no test coverage detected