diff options
author | Benji Dial <benji6283@gmail.com> | 2023-12-25 14:38:37 -0500 |
---|---|---|
committer | Benji Dial <benji6283@gmail.com> | 2023-12-25 14:38:37 -0500 |
commit | 3ed235ac0b4faca52a95027e98fcb4d466a699ae (patch) | |
tree | 55476e8a137e9185612ba00b0f7f889d5ef8fcd2 | |
parent | 8723fe078180916a6b2f736232e7f5bec2b9674e (diff) | |
download | lib94-3ed235ac0b4faca52a95027e98fcb4d466a699ae.tar.gz |
add virtual destructors to expr and assertion
-rw-r--r-- | lib94/warrior.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
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; }; |