From edc0c0d7a06c5f48223fb65a534512147e2351e4 Mon Sep 17 00:00:00 2001 From: sithlord48 Date: Wed, 30 Apr 2025 21:09:00 -0400 Subject: [PATCH] chore: XArch, use default for constructors / deconstrucor use noexecpt for virtual deconstctor use explicit for constructors --- src/lib/arch/XArch.h | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/src/lib/arch/XArch.h b/src/lib/arch/XArch.h index 8defb3d5a..897725fbc 100644 --- a/src/lib/arch/XArch.h +++ b/src/lib/arch/XArch.h @@ -55,13 +55,8 @@ string for that error code. class XArchEval { public: - XArchEval() - { - } - virtual ~XArchEval() throw() - { - } - + XArchEval() = default; + virtual ~XArchEval() noexcept = default; virtual std::string eval() const = 0; }; @@ -69,16 +64,14 @@ public: class XArch : public std::runtime_error { public: - XArch(XArchEval *adopted) : std::runtime_error(adopted->eval()) + explicit XArch(XArchEval *adopted) : std::runtime_error(adopted->eval()) { delete adopted; } - XArch(const std::string &msg) : std::runtime_error(msg) - { - } - ~XArch() throw() override + explicit XArch(const std::string &msg) : std::runtime_error(msg) { } + ~XArch() throw() override = default; }; // Macro to declare XArch derived types