From 75681d760c478f772fdb1603222498f96a9b61e7 Mon Sep 17 00:00:00 2001 From: couriersud Date: Sat, 13 Jun 2020 15:48:54 +0200 Subject: netlist: Make fostrm actually write to file. (nw) Also fix typos and a tidy warning. --- src/lib/netlist/nl_base.cpp | 6 ++---- src/lib/netlist/nltypes.h | 2 +- src/lib/netlist/plib/penum.h | 1 - src/lib/netlist/plib/pstream.h | 2 +- 4 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/lib/netlist/nl_base.cpp b/src/lib/netlist/nl_base.cpp index b09c60b901a..42104458f7a 100644 --- a/src/lib/netlist/nl_base.cpp +++ b/src/lib/netlist/nl_base.cpp @@ -831,10 +831,8 @@ namespace netlist device.state().setup().register_param_t(*this); } - param_t::~param_t() noexcept - { - // placed here to avoid weak vtable warnings - } + // placed here to avoid weak vtable warnings + param_t::~param_t() noexcept = default; param_t::param_type_t param_t::param_type() const noexcept(false) { diff --git a/src/lib/netlist/nltypes.h b/src/lib/netlist/nltypes.h index 8ee9da300b2..17912a41d13 100644 --- a/src/lib/netlist/nltypes.h +++ b/src/lib/netlist/nltypes.h @@ -187,7 +187,7 @@ namespace netlist } }; - /// \brief: used define a constant in device description struct + /// \brief: used to define a constant in device description struct /// /// See the 74125 implementation /// diff --git a/src/lib/netlist/plib/penum.h b/src/lib/netlist/plib/penum.h index ff15c9252c0..2765e262773 100644 --- a/src/lib/netlist/plib/penum.h +++ b/src/lib/netlist/plib/penum.h @@ -34,7 +34,6 @@ namespace plib enum E { __VA_ARGS__ }; \ constexpr ename (const E &v) : m_v(v) { } \ template explicit constexpr ename(const T &val) { m_v = static_cast(val); } \ - template explicit constexpr ename(T && val) { m_v = static_cast(val); } \ bool set_from_string (const pstring &s) { \ int f = from_string_int(strings(), s); \ if (f>=0) { m_v = static_cast(f); return true; } \ diff --git a/src/lib/netlist/plib/pstream.h b/src/lib/netlist/plib/pstream.h index 87bb9240b64..c47bd71ab1e 100644 --- a/src/lib/netlist/plib/pstream.h +++ b/src/lib/netlist/plib/pstream.h @@ -289,7 +289,7 @@ public: pstring_t, pstring_t>::type; template - explicit ofstream(const pstring_t name, ios_base::openmode mode = ios_base::in) + explicit ofstream(const pstring_t name, ios_base::openmode mode = ios_base::out | ios_base::trunc) : std::ofstream(filename_type(name).c_str(), mode) { } -- cgit v1.2.3