Skip to content

Commit c37cff5

Browse files
Added missing virtual destructors
1 parent 1cec094 commit c37cff5

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

api/Print.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ class Print
4242
void setWriteError(int err = 1) { write_error = err; }
4343
public:
4444
Print() : write_error(0) {}
45+
virtual ~Print() {}
46+
4547

4648
int getWriteError() { return write_error; }
4749
void clearWriteError() { setWriteError(0); }

api/Printable.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ class Print;
3333
class Printable
3434
{
3535
public:
36+
virtual ~Printable() {}
3637
virtual size_t printTo(Print& p) const = 0;
3738
};
3839

api/String.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ class String
8181
explicit String(unsigned long, unsigned char base=10);
8282
explicit String(float, unsigned char decimalPlaces=2);
8383
explicit String(double, unsigned char decimalPlaces=2);
84-
~String(void);
84+
virtual ~String(void);
8585

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

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy