From 3ed235ac0b4faca52a95027e98fcb4d466a699ae Mon Sep 17 00:00:00 2001 From: Benji Dial Date: Mon, 25 Dec 2023 14:38:37 -0500 Subject: add virtual destructors to expr and assertion --- lib94/warrior.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib94/warrior.cpp b/lib94/warrior.cpp index ba6edbc..a744cb8 100644 --- a/lib94/warrior.cpp +++ b/lib94/warrior.cpp @@ -60,6 +60,7 @@ namespace lib94 { //this abstract class represents expression fields extracted in stage 2 and evaluted in stage 4. class expr { public: + virtual ~expr() = default; unsigned source_line_number; number_t offset; virtual intermediate_t evaluate(const label_offset_set &label_offsets) const = 0; @@ -68,6 +69,7 @@ namespace lib94 { //this abstract class represents assertions fields extracted in stage 1 and evaluated in stage 3 class assertion { public: + virtual ~assertion() = default; unsigned source_line_number; virtual bool check(const label_offset_set &label_offsets) const = 0; }; -- cgit v1.2.3