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

Function MakeActiveResult

3party/opening_hours/rules_evaluation.cpp:340–346  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

338
339template <class TTimeSpans>
340std::pair<bool, bool> MakeActiveResult(RuleSequence const & rule, std::tm const & dt, TTimeSpans const & times)
341{
342 if (IsDayActive(rule, dt))
343 return { true, IsActiveAny(times, dt) };
344 else
345 return {false, false};
346}
347
348/// @return [day active, time active].
349std::pair<bool, bool> IsActiveImpl(RuleSequence const & rule, time_t const timestamp)

Callers 1

IsActiveImplFunction · 0.85

Calls 2

IsDayActiveFunction · 0.85
IsActiveAnyFunction · 0.85

Tested by

no test coverage detected