aboutsummaryrefslogtreecommitdiff
path: root/cores/arduino/Printable.h
diff options
context:
space:
mode:
authoramcewen <amcewen@bcs.org.uk>2011-04-10 11:34:40 +0100
committeramcewen <amcewen@bcs.org.uk>2011-04-10 11:34:40 +0100
commitedee02eaf19c4d13324959e6db881dc327342561 (patch)
treef389ed5f2b95735e833d6bca1c4ac7a0fc419d06 /cores/arduino/Printable.h
parent49155d0a4604eb50d756527ef9512499d2ea6cf4 (diff)
Added virtual destructor to Printable, which also requires new and delete operators to be added
Diffstat (limited to 'cores/arduino/Printable.h')
-rw-r--r--cores/arduino/Printable.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/cores/arduino/Printable.h b/cores/arduino/Printable.h
index e5d7732..5ff6077 100644
--- a/cores/arduino/Printable.h
+++ b/cores/arduino/Printable.h
@@ -20,6 +20,8 @@
#ifndef Printable_h
#define Printable_h
+#include <new.h>
+
class Print;
/** The Printable class provides a way for new classes to allow themselves to be printed.
@@ -31,6 +33,7 @@ class Print;
class Printable
{
public:
+ virtual ~Printable() {};
virtual void printTo(Print& p) const =0;
};