mirror of
https://github.com/holub/mame
synced 2025-04-26 10:13:37 +03:00
Fix clang warnings in netlist code.
Fixed -Winconsistent-missing-destructor-override warnings. Made some constructors of template classes and classes with virtual .. = 0 methods protected. Fixed src/lib/netlist/build/makefile (nw)
This commit is contained in:
parent
c26bc20f2b
commit
d23cecc86b
@ -142,7 +142,7 @@ VSBUILDS = \
|
||||
$(VSBUILD/netlist.sln \
|
||||
|
||||
DOCS = \
|
||||
doxygen.conf
|
||||
doxygen.conf \
|
||||
$(DOC)/doc.css \
|
||||
$(DOC)/mainpage.dox.h \
|
||||
$(DOC)/primer_1.dox.h \
|
||||
|
@ -69,7 +69,7 @@ namespace netlist
|
||||
public:
|
||||
nld_a_to_d_proxy(netlist_t &anetlist, const pstring &name, logic_input_t *in_proxied);
|
||||
|
||||
virtual ~nld_a_to_d_proxy();
|
||||
virtual ~nld_a_to_d_proxy() override;
|
||||
|
||||
analog_input_t m_I;
|
||||
|
||||
@ -105,7 +105,7 @@ namespace netlist
|
||||
{
|
||||
public:
|
||||
nld_d_to_a_proxy(netlist_t &anetlist, const pstring &name, logic_output_t *out_proxied);
|
||||
virtual ~nld_d_to_a_proxy() {}
|
||||
virtual ~nld_d_to_a_proxy() override {}
|
||||
|
||||
protected:
|
||||
|
||||
|
@ -1128,7 +1128,7 @@ namespace netlist
|
||||
device_t(netlist_t &owner, const pstring &name);
|
||||
device_t(core_device_t &owner, const pstring &name);
|
||||
|
||||
virtual ~device_t();
|
||||
virtual ~device_t() override;
|
||||
|
||||
setup_t &setup();
|
||||
|
||||
|
@ -116,8 +116,6 @@ class pformat_base
|
||||
{
|
||||
public:
|
||||
|
||||
virtual ~pformat_base() { }
|
||||
|
||||
P &operator ()(const double x, const char *f = "") { format_element(f, "", "f", x); return static_cast<P &>(*this); }
|
||||
P & e(const double x, const char *f = "") { format_element(f, "", "e", x); return static_cast<P &>(*this); }
|
||||
P & g(const double x, const char *f = "") { format_element(f, "", "g", x); return static_cast<P &>(*this); }
|
||||
@ -157,6 +155,7 @@ public:
|
||||
|
||||
protected:
|
||||
|
||||
~pformat_base() { }
|
||||
virtual void format_element(const char *f, const char *l, const char *fmt_spec, ...) = 0;
|
||||
|
||||
};
|
||||
@ -190,7 +189,6 @@ class pfmt_writer_t : plib::nocopyassignmove
|
||||
{
|
||||
public:
|
||||
explicit pfmt_writer_t() : m_enabled(true) { }
|
||||
virtual ~pfmt_writer_t() { }
|
||||
|
||||
/* runtime enable */
|
||||
template<bool enabled, typename... Args>
|
||||
@ -242,6 +240,7 @@ public:
|
||||
bool is_enabled() const { return m_enabled; }
|
||||
|
||||
protected:
|
||||
~pfmt_writer_t() { }
|
||||
virtual void vdowrite(const pstring &ls) const = 0;
|
||||
|
||||
private:
|
||||
|
@ -62,7 +62,8 @@ pifilestream::pifilestream(const pstring &fname)
|
||||
{
|
||||
if (m_file == nullptr)
|
||||
throw file_open_e(fname);
|
||||
init();
|
||||
else
|
||||
init();
|
||||
}
|
||||
|
||||
pifilestream::pifilestream(void *file, const pstring &name, const bool do_close)
|
||||
|
@ -43,7 +43,7 @@ protected:
|
||||
explicit pstream(const unsigned flags) : m_flags(flags)
|
||||
{
|
||||
}
|
||||
virtual ~pstream();
|
||||
~pstream();
|
||||
|
||||
virtual void vseek(const pos_type n) = 0;
|
||||
virtual pos_type vtell() = 0;
|
||||
@ -73,7 +73,6 @@ class pistream : public pstream
|
||||
{
|
||||
public:
|
||||
|
||||
explicit pistream(const unsigned flags) : pstream(flags) {}
|
||||
virtual ~pistream();
|
||||
|
||||
bool eof() const { return ((flags() & FLAG_EOF) != 0); }
|
||||
@ -84,6 +83,7 @@ public:
|
||||
}
|
||||
|
||||
protected:
|
||||
explicit pistream(const unsigned flags) : pstream(flags) {}
|
||||
/* read up to n bytes from stream */
|
||||
virtual pos_type vread(void *buf, const pos_type n) = 0;
|
||||
|
||||
@ -97,7 +97,6 @@ class postream : public pstream
|
||||
{
|
||||
public:
|
||||
|
||||
explicit postream(unsigned flags) : pstream(flags) {}
|
||||
virtual ~postream();
|
||||
|
||||
void write(const void *buf, const pos_type n)
|
||||
@ -108,6 +107,7 @@ public:
|
||||
void write(pistream &strm);
|
||||
|
||||
protected:
|
||||
explicit postream(unsigned flags) : pstream(flags) {}
|
||||
/* write n bytes to stream */
|
||||
virtual void vwrite(const void *buf, const pos_type n) = 0;
|
||||
|
||||
@ -123,7 +123,7 @@ class pomemstream : public postream
|
||||
public:
|
||||
|
||||
pomemstream();
|
||||
virtual ~pomemstream();
|
||||
virtual ~pomemstream() override;
|
||||
|
||||
char *memory() const { return m_mem; }
|
||||
pos_type size() const { return m_size; }
|
||||
@ -146,7 +146,7 @@ class postringstream : public postream
|
||||
public:
|
||||
|
||||
postringstream() : postream(0) { }
|
||||
virtual ~postringstream();
|
||||
virtual ~postringstream() override;
|
||||
|
||||
const pstringbuffer &str() { return m_buf; }
|
||||
|
||||
@ -172,7 +172,7 @@ class pofilestream : public postream
|
||||
public:
|
||||
|
||||
explicit pofilestream(const pstring &fname);
|
||||
virtual ~pofilestream();
|
||||
virtual ~pofilestream() override;
|
||||
|
||||
protected:
|
||||
pofilestream(void *file, const pstring &name, const bool do_close);
|
||||
@ -221,7 +221,7 @@ class pifilestream : public pistream
|
||||
public:
|
||||
|
||||
explicit pifilestream(const pstring &fname);
|
||||
virtual ~pifilestream();
|
||||
virtual ~pifilestream() override;
|
||||
|
||||
protected:
|
||||
pifilestream(void *file, const pstring &name, const bool do_close);
|
||||
@ -249,7 +249,7 @@ class pstdin : public pifilestream
|
||||
public:
|
||||
|
||||
pstdin();
|
||||
virtual ~pstdin();
|
||||
virtual ~pstdin() override;
|
||||
};
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
@ -262,7 +262,7 @@ public:
|
||||
|
||||
pimemstream(const void *mem, const pos_type len);
|
||||
explicit pimemstream(const pomemstream &ostrm);
|
||||
virtual ~pimemstream();
|
||||
virtual ~pimemstream() override;
|
||||
|
||||
pos_type size() const { return m_len; }
|
||||
protected:
|
||||
@ -285,7 +285,7 @@ class pistringstream : public pimemstream
|
||||
{
|
||||
public:
|
||||
explicit pistringstream(const pstring &str) : pimemstream(str.c_str(), str.len()), m_str(str) { }
|
||||
virtual ~pistringstream();
|
||||
virtual ~pistringstream() override;
|
||||
|
||||
private:
|
||||
/* only needed for a reference till destruction */
|
||||
@ -365,7 +365,7 @@ class putf8_fmt_writer : public pfmt_writer_t<>, public putf8_writer
|
||||
public:
|
||||
|
||||
explicit putf8_fmt_writer(postream &strm);
|
||||
virtual ~putf8_fmt_writer();
|
||||
virtual ~putf8_fmt_writer() override;
|
||||
|
||||
protected:
|
||||
virtual void vdowrite(const pstring &ls) const override;
|
||||
|
@ -126,7 +126,8 @@ std::unique_ptr<plib::pistream> netlist_data_folder_t::stream(const pstring &fil
|
||||
}
|
||||
catch (const plib::pexception &e)
|
||||
{
|
||||
|
||||
if (dynamic_cast<const plib::file_open_e *>(&e) == nullptr )
|
||||
throw;
|
||||
}
|
||||
return std::unique_ptr<plib::pistream>(nullptr);
|
||||
}
|
||||
@ -140,7 +141,7 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
~netlist_tool_t()
|
||||
virtual ~netlist_tool_t() override
|
||||
{
|
||||
}
|
||||
|
||||
@ -775,5 +776,3 @@ int tool_app_t::execute()
|
||||
}
|
||||
|
||||
PMAIN(tool_app_t)
|
||||
|
||||
//plib::app *appconstructor() { return new tool_app_t(); }
|
||||
|
@ -101,10 +101,7 @@ public:
|
||||
DESCENDING
|
||||
};
|
||||
|
||||
matrix_solver_t(netlist_t &anetlist, const pstring &name,
|
||||
const eSortType sort, const solver_parameters_t *params);
|
||||
|
||||
virtual ~matrix_solver_t();
|
||||
virtual ~matrix_solver_t() override;
|
||||
|
||||
void setup(analog_net_t::list_t &nets)
|
||||
{
|
||||
@ -144,6 +141,9 @@ public:
|
||||
|
||||
protected:
|
||||
|
||||
matrix_solver_t(netlist_t &anetlist, const pstring &name,
|
||||
const eSortType sort, const solver_parameters_t *params);
|
||||
|
||||
void setup_base(analog_net_t::list_t &nets);
|
||||
void update_dynamic();
|
||||
|
||||
|
@ -127,7 +127,7 @@ public:
|
||||
matrix_solver_direct_t(netlist_t &anetlist, const pstring &name, const solver_parameters_t *params, const std::size_t size);
|
||||
matrix_solver_direct_t(netlist_t &anetlist, const pstring &name, const eSortType sort, const solver_parameters_t *params, const std::size_t size);
|
||||
|
||||
virtual ~matrix_solver_direct_t();
|
||||
virtual ~matrix_solver_direct_t() override;
|
||||
|
||||
virtual void vsetup(analog_net_t::list_t &nets) override;
|
||||
virtual void reset() override { matrix_solver_t::reset(); }
|
||||
|
@ -37,7 +37,7 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
virtual ~matrix_solver_GCR_t()
|
||||
virtual ~matrix_solver_GCR_t() override
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -37,7 +37,7 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
virtual ~matrix_solver_GMRES_t()
|
||||
virtual ~matrix_solver_GMRES_t() override
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -57,7 +57,7 @@ public:
|
||||
matrix_solver_sm_t(netlist_t &anetlist, const pstring &name,
|
||||
const solver_parameters_t *params, const std::size_t size);
|
||||
|
||||
virtual ~matrix_solver_sm_t();
|
||||
virtual ~matrix_solver_sm_t() override;
|
||||
|
||||
virtual void vsetup(analog_net_t::list_t &nets) override;
|
||||
virtual void reset() override { matrix_solver_t::reset(); }
|
||||
|
@ -32,7 +32,7 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
virtual ~matrix_solver_SOR_t() {}
|
||||
virtual ~matrix_solver_SOR_t() override {}
|
||||
|
||||
virtual void vsetup(analog_net_t::list_t &nets) override;
|
||||
virtual unsigned vsolve_non_dynamic(const bool newton_raphson) override;
|
||||
|
@ -39,7 +39,7 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
virtual ~matrix_solver_SOR_mat_t() {}
|
||||
virtual ~matrix_solver_SOR_mat_t() override {}
|
||||
|
||||
virtual void vsetup(analog_net_t::list_t &nets) override;
|
||||
|
||||
|
@ -62,7 +62,7 @@ public:
|
||||
|
||||
matrix_solver_w_t(netlist_t &anetlist, const pstring &name, const solver_parameters_t *params, const std::size_t size);
|
||||
|
||||
virtual ~matrix_solver_w_t();
|
||||
virtual ~matrix_solver_w_t() override;
|
||||
|
||||
virtual void vsetup(analog_net_t::list_t &nets) override;
|
||||
virtual void reset() override { matrix_solver_t::reset(); }
|
||||
|
@ -63,7 +63,7 @@ NETLIB_OBJECT(solver)
|
||||
connect(m_fb_step, m_Q_step);
|
||||
}
|
||||
|
||||
virtual ~NETLIB_NAME(solver)();
|
||||
virtual ~NETLIB_NAME(solver)() override;
|
||||
|
||||
void post_start();
|
||||
void stop();
|
||||
|
@ -23,7 +23,6 @@ class nl_convert_base_t
|
||||
{
|
||||
public:
|
||||
|
||||
nl_convert_base_t();
|
||||
virtual ~nl_convert_base_t();
|
||||
|
||||
const pstringbuffer &result() { return m_buf.str(); }
|
||||
@ -31,6 +30,7 @@ public:
|
||||
virtual void convert(const pstring &contents) = 0;
|
||||
|
||||
protected:
|
||||
nl_convert_base_t();
|
||||
|
||||
void add_pin_alias(const pstring &devname, const pstring &name, const pstring &alias);
|
||||
|
||||
@ -140,7 +140,7 @@ class nl_convert_spice_t : public nl_convert_base_t
|
||||
public:
|
||||
|
||||
nl_convert_spice_t() : nl_convert_base_t() {}
|
||||
~nl_convert_spice_t()
|
||||
virtual ~nl_convert_spice_t() override
|
||||
{
|
||||
}
|
||||
|
||||
@ -159,7 +159,7 @@ class nl_convert_eagle_t : public nl_convert_base_t
|
||||
public:
|
||||
|
||||
nl_convert_eagle_t() : nl_convert_base_t() {}
|
||||
~nl_convert_eagle_t()
|
||||
virtual ~nl_convert_eagle_t() override
|
||||
{
|
||||
}
|
||||
|
||||
@ -195,7 +195,7 @@ class nl_convert_rinf_t : public nl_convert_base_t
|
||||
public:
|
||||
|
||||
nl_convert_rinf_t() : nl_convert_base_t() {}
|
||||
~nl_convert_rinf_t()
|
||||
virtual ~nl_convert_rinf_t() override
|
||||
{
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user