chore: XArch, use default for constructors / deconstrucor
use noexecpt for virtual deconstctor use explicit for constructors
This commit is contained in:
parent
95586c88fd
commit
edc0c0d7a0
1 changed files with 5 additions and 12 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue