Skip to content

Commit

Permalink
Fixed an issue where the active event start offset didn't match the a…
Browse files Browse the repository at this point in the history
…ctual start offset
  • Loading branch information
jeremypoulter committed Jul 19, 2022
1 parent 31b9fae commit e182a91
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/scheduler.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class Scheduler : public MicroTasks::Task
EventInstance &operator=(const EventInstance &rhs) {
_event = rhs._event;
_day = rhs._day;
_startOffset = randomiseStartOffset();
_startOffset = rhs._startOffset;
return *this;
};

Expand All @@ -62,15 +62,15 @@ class Scheduler : public MicroTasks::Task
}

bool operator==(const EventInstance &rhs) const {
return _event == rhs._event && _day == rhs._day;
return _event == rhs._event && _day == rhs._day && _startOffset == rhs._startOffset;
};

bool operator!=(const EventInstance &rhs) const {
return !(*this == rhs);
};

bool operator==(const EventInstance *rhs) const {
return _event == rhs->_event && _day == rhs->_day;
return _event == rhs->_event && _day == rhs->_day && _startOffset == rhs->_startOffset;
};

bool operator!=(const EventInstance *rhs) const {
Expand Down

0 comments on commit e182a91

Please sign in to comment.