Skip to content

Commit

Permalink
Merge pull request #4 from mxtommy/master
Browse files Browse the repository at this point in the history
Add Virtual destroctors to get rid of warnings
  • Loading branch information
mairas authored Oct 24, 2019
2 parents 3a86f63 + f19e47d commit f5bc24b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/ReactESP.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ class TimedReaction : public Reaction {
last_trigger_time = millis();
enabled = true;
}
virtual ~TimedReaction() {}
bool operator<(const TimedReaction& other);
void add();
void remove();
Expand All @@ -59,6 +60,7 @@ struct TriggerTimeCompare
class DelayReaction : public TimedReaction {
public:
DelayReaction(const uint32_t interval, const react_callback callback);
virtual ~DelayReaction() {}
void tick();
};

Expand All @@ -73,6 +75,7 @@ class UntimedReaction : public Reaction {
public:
UntimedReaction(const react_callback callback)
: Reaction(callback) {}
virtual ~UntimedReaction() {}
virtual void add();
virtual void remove();
virtual void tick() = 0;
Expand Down Expand Up @@ -101,6 +104,7 @@ class ISRReaction : public Reaction {
public:
ISRReaction(uint32_t pin_number, int mode, const react_callback callback)
: Reaction(callback), pin_number(pin_number), mode(mode) {}
virtual ~ISRReaction() {}
void add();
void remove();
void tick();
Expand Down

0 comments on commit f5bc24b

Please sign in to comment.