Skip to content

Commit

Permalink
fix: virtual destructors in interfaces
Browse files Browse the repository at this point in the history
  • Loading branch information
arcadien committed Nov 13, 2023
1 parent 3b6fae5 commit 6a77524
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
9 changes: 5 additions & 4 deletions lib/Domain/IGunHal.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,16 @@

class IGunHal {
public:
virtual void isButton1Pressed() = 0;
virtual void isButton2Pressed() = 0;
virtual ~IGunHal() {}
virtual bool isButton1Pressed() = 0;
virtual bool isButton2Pressed() = 0;
virtual void shortDelay() = 0;
virtual void longDelay() = 0;
virtual void ledOn() = 0;
virtual void ledOff() = 0;
virtual void laserOn() = 0;
virtual void laserOff() = 0;
virtual void vibrationOn() = 0;
virtual void vibrationOff() = 0;
virtual void deepSleep() = 0;
virtual void vibrationOff() = 0;
virtual void deepSleep() = 0;
};
2 changes: 2 additions & 0 deletions lib/Domain/ITargetGui.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ class ITargetGui {
Five
};

virtual ~ITargetGui() {}

/**
* Tell GUI a target has been hit
*/
Expand Down

0 comments on commit 6a77524

Please sign in to comment.