Skip to content

Commit

Permalink
Added missing virtual destructors
Browse files Browse the repository at this point in the history
  • Loading branch information
andreagilardoni committed Nov 21, 2023
1 parent fc9a636 commit 722dd67
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions api/Printable.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ class Print;
class Printable
{
public:
virtual ~Printable() {}
virtual size_t printTo(Print& p) const = 0;
};

Expand Down
1 change: 1 addition & 0 deletions api/Stream.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ class Stream : public Print
virtual int peek() = 0;

Stream() {_timeout=1000;}
virtual ~Stream() {}

// parsing methods

Expand Down
2 changes: 1 addition & 1 deletion api/String.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ class String
explicit String(unsigned long, unsigned char base=10);
explicit String(float, unsigned char decimalPlaces=2);
explicit String(double, unsigned char decimalPlaces=2);
~String(void);
virtual ~String(void);

// memory management
// return true on success, false on failure (in which case, the string
Expand Down

0 comments on commit 722dd67

Please sign in to comment.