Make destructors virtual on base classes. (nw)

This commit is contained in:
couriersud 2017-01-05 17:51:39 +01:00
parent f1135f7c4c
commit 47492e4821
3 changed files with 4 additions and 3 deletions

View File

@ -899,7 +899,6 @@ logic_output_t::~logic_output_t()
{ {
} }
void logic_output_t::initial(const netlist_sig_t val) void logic_output_t::initial(const netlist_sig_t val)
{ {
net().initial(val); net().initial(val);

View File

@ -235,7 +235,7 @@ namespace netlist
{ {
public: public:
logic_family_desc_t(); logic_family_desc_t();
virtual ~logic_family_desc_t(); ~logic_family_desc_t();
virtual plib::owned_ptr<devices::nld_base_d_to_a_proxy> create_d_a_proxy(netlist_t &anetlist, const pstring &name, virtual plib::owned_ptr<devices::nld_base_d_to_a_proxy> create_d_a_proxy(netlist_t &anetlist, const pstring &name,
logic_output_t *proxied) const = 0; logic_output_t *proxied) const = 0;
@ -386,7 +386,7 @@ namespace netlist
* Every class derived from the object_t class must have a name. * Every class derived from the object_t class must have a name.
*/ */
object_t(const pstring &aname /*!< string containing name of the object */); object_t(const pstring &aname /*!< string containing name of the object */);
~object_t(); virtual ~object_t();
/*! return name of the object /*! return name of the object
* *
@ -406,6 +406,7 @@ namespace netlist
struct detail::netlist_ref struct detail::netlist_ref
{ {
netlist_ref(netlist_t &nl) : m_netlist(nl) { } netlist_ref(netlist_t &nl) : m_netlist(nl) { }
~netlist_ref() {}
netlist_t & netlist() { return m_netlist; } netlist_t & netlist() { return m_netlist; }
const netlist_t & netlist() const { return m_netlist; } const netlist_t & netlist() const { return m_netlist; }

View File

@ -84,6 +84,7 @@ public:
friend class linkedlist_t<LC>; friend class linkedlist_t<LC>;
element_t() : m_next(nullptr) {} element_t() : m_next(nullptr) {}
virtual ~element_t() = default;
LC *next() const noexcept { return m_next; } LC *next() const noexcept { return m_next; }
private: private: