From c2c4ead2820aa0b4e7d0aa0276fc02caefe1b471 Mon Sep 17 00:00:00 2001 From: Duncan Ogilvie Date: Sun, 13 Oct 2024 16:21:24 +0200 Subject: [PATCH] Make Program and Assembler non-final --- zasm/include/zasm/program/program.hpp | 6 +++--- zasm/include/zasm/x86/assembler.hpp | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/zasm/include/zasm/program/program.hpp b/zasm/include/zasm/program/program.hpp index 32bb614..e9c4931 100644 --- a/zasm/include/zasm/program/program.hpp +++ b/zasm/include/zasm/program/program.hpp @@ -23,7 +23,7 @@ namespace zasm class Observer; - class Program final + class Program { std::unique_ptr _state; @@ -39,11 +39,11 @@ namespace zasm /// Constructs an empty program with the specified machine mode. /// /// Machine Mode - Program(MachineMode mode); + explicit Program(MachineMode mode); Program(const Program&) = delete; Program(Program&& other) noexcept; - ~Program(); + virtual ~Program(); Program& operator=(const Program&) = delete; Program& operator=(Program&& other) noexcept; diff --git a/zasm/include/zasm/x86/assembler.hpp b/zasm/include/zasm/x86/assembler.hpp index 2caab9b..3cb2473 100644 --- a/zasm/include/zasm/x86/assembler.hpp +++ b/zasm/include/zasm/x86/assembler.hpp @@ -18,15 +18,15 @@ namespace zasm namespace zasm::x86 { - class Assembler final : public Emitter, public Observer + class Assembler : public Emitter, public Observer { Program& _program; Node* _cursor{}; InstrAttribs _attribState{}; public: - Assembler(Program& _program); - ~Assembler(); + explicit Assembler(Program& _program); + virtual ~Assembler(); /// /// Sets the node at where the next node will be inserted after.