diff options
author | 2020-04-25 21:26:53 +0200 | |
---|---|---|
committer | 2020-04-26 01:35:31 +0200 | |
commit | 0cf99a5310d14acec93f12eb0434a2253e77917b (patch) | |
tree | 69ed3f5abe0f3ccade35d930b7f0dc4d34fb9601 /src | |
parent | 462943bf9e24b842de5881883f3f2c65d4b29df2 (diff) |
netlist: rename some macros. (nw)
Rename COPYASSIGN* and friends to PCOPYASSIGN*.
Diffstat (limited to 'src')
26 files changed, 75 insertions, 98 deletions
diff --git a/src/lib/netlist/buildVS/netlistlib.vcxproj b/src/lib/netlist/buildVS/netlistlib.vcxproj index 1926e07c474..78b00d6ac74 100755 --- a/src/lib/netlist/buildVS/netlistlib.vcxproj +++ b/src/lib/netlist/buildVS/netlistlib.vcxproj @@ -167,6 +167,7 @@ <ClCompile Include="..\devices\nld_tristate.cpp" /> <ClCompile Include="..\devices\nlid_proxy.cpp" /> <ClCompile Include="..\devices\nlid_truthtable.cpp" /> + <ClCompile Include="..\generated\static_solvers.cpp" /> <ClCompile Include="..\macro\nlm_base.cpp" /> <ClCompile Include="..\macro\nlm_cd4xxx.cpp" /> <ClCompile Include="..\macro\nlm_opamp.cpp" /> diff --git a/src/lib/netlist/buildVS/netlistlib.vcxproj.filters b/src/lib/netlist/buildVS/netlistlib.vcxproj.filters index f661e0d53bf..976c81f914b 100755 --- a/src/lib/netlist/buildVS/netlistlib.vcxproj.filters +++ b/src/lib/netlist/buildVS/netlistlib.vcxproj.filters @@ -261,6 +261,9 @@ <ClCompile Include="..\devices\nld_4006.cpp"> <Filter>Source Files</Filter> </ClCompile> + <ClCompile Include="..\generated\static_solvers.cpp"> + <Filter>Source Files</Filter> + </ClCompile> </ItemGroup> <ItemGroup> <ClInclude Include="..\nl_errstr.h"> diff --git a/src/lib/netlist/buildVS/nltool.vcxproj b/src/lib/netlist/buildVS/nltool.vcxproj index 680dd7a054a..1cf9c41818c 100755 --- a/src/lib/netlist/buildVS/nltool.vcxproj +++ b/src/lib/netlist/buildVS/nltool.vcxproj @@ -80,6 +80,7 @@ </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <LinkIncremental>false</LinkIncremental> + <IncludePath>$(ProjectDir)\..\..;$(IncludePath)</IncludePath> </PropertyGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <ClCompile> diff --git a/src/lib/netlist/generated/static_solvers.cpp b/src/lib/netlist/generated/static_solvers.cpp index 6853580111e..6853580111e 100755..100644 --- a/src/lib/netlist/generated/static_solvers.cpp +++ b/src/lib/netlist/generated/static_solvers.cpp diff --git a/src/lib/netlist/nl_base.h b/src/lib/netlist/nl_base.h index 53706060783..8a63d724205 100644 --- a/src/lib/netlist/nl_base.h +++ b/src/lib/netlist/nl_base.h @@ -259,7 +259,7 @@ namespace netlist public: logic_family_desc_t(); - COPYASSIGNMOVE(logic_family_desc_t, delete) + PCOPYASSIGNMOVE(logic_family_desc_t, delete) virtual ~logic_family_desc_t() noexcept = default; @@ -304,7 +304,7 @@ namespace netlist { public: logic_family_t() : m_logic_family(nullptr) {} - COPYASSIGNMOVE(logic_family_t, delete) + PCOPYASSIGNMOVE(logic_family_t, delete) const logic_family_desc_t *logic_family() const noexcept { return m_logic_family; } void set_logic_family(const logic_family_desc_t *fam) noexcept { m_logic_family = fam; } @@ -485,7 +485,7 @@ namespace netlist props::add(this, aname); } - COPYASSIGNMOVE(object_t, delete) + PCOPYASSIGNMOVE(object_t, delete) /// \brief return name of the object /// /// \returns name of the object. @@ -516,7 +516,7 @@ namespace netlist , m_netlist(nl) { } - COPYASSIGNMOVE(netlist_object_t, delete) + PCOPYASSIGNMOVE(netlist_object_t, delete) netlist_state_t & state() noexcept; const netlist_state_t & state() const noexcept; @@ -603,7 +603,7 @@ namespace netlist state_e state, nldelegate delegate = nldelegate()); virtual ~core_terminal_t() noexcept = default; - COPYASSIGNMOVE(core_terminal_t, delete) + PCOPYASSIGNMOVE(core_terminal_t, delete) /// \brief The object type. /// \returns type of the object @@ -672,7 +672,7 @@ namespace netlist net_t(netlist_state_t &nl, const pstring &aname, core_terminal_t *railterminal = nullptr); - COPYASSIGNMOVE(net_t, delete) + PCOPYASSIGNMOVE(net_t, delete) virtual ~net_t() noexcept = default; @@ -1007,7 +1007,7 @@ namespace netlist core_device_t(netlist_state_t &owner, const pstring &name); core_device_t(core_device_t &owner, const pstring &name); - COPYASSIGNMOVE(core_device_t, delete) + PCOPYASSIGNMOVE(core_device_t, delete) virtual ~core_device_t() noexcept = default; @@ -1085,7 +1085,7 @@ namespace netlist device_t(netlist_state_t &owner, const pstring &name); device_t(core_device_t &owner, const pstring &name); - COPYASSIGNMOVE(device_t, delete) + PCOPYASSIGNMOVE(device_t, delete) ~device_t() noexcept override = default; @@ -1124,7 +1124,7 @@ namespace netlist param_t(device_t &device, const pstring &name); - COPYASSIGNMOVE(param_t, delete) + PCOPYASSIGNMOVE(param_t, delete) param_type_t param_type() const noexcept(false); @@ -1377,7 +1377,7 @@ namespace netlist netlist_state_t(const pstring &aname, plib::unique_ptr<callbacks_t> &&callbacks); - COPYASSIGNMOVE(netlist_state_t, delete) + PCOPYASSIGNMOVE(netlist_state_t, delete) /// \brief Destructor /// @@ -1645,7 +1645,7 @@ namespace netlist explicit netlist_t(netlist_state_t &state); - COPYASSIGNMOVE(netlist_t, delete) + PCOPYASSIGNMOVE(netlist_t, delete) virtual ~netlist_t() noexcept = default; diff --git a/src/lib/netlist/nl_factory.h b/src/lib/netlist/nl_factory.h index 53218c0d56e..151c21cf349 100644 --- a/src/lib/netlist/nl_factory.h +++ b/src/lib/netlist/nl_factory.h @@ -53,7 +53,7 @@ namespace factory { const pstring &def_param, const pstring &sourcefile); virtual ~element_t() = default; - COPYASSIGNMOVE(element_t, default) + PCOPYASSIGNMOVE(element_t, default) virtual unique_pool_ptr<device_t> make_device(nlmempool &pool, netlist_state_t &anetlist, @@ -109,7 +109,7 @@ namespace factory { explicit list_t(log_type &alog); ~list_t() = default; - COPYASSIGNMOVE(list_t, delete) + PCOPYASSIGNMOVE(list_t, delete) template<class device_class> void register_device(const pstring &name, const pstring &classname, diff --git a/src/lib/netlist/nl_setup.h b/src/lib/netlist/nl_setup.h index 9b1a24c4d7c..0dfc7d97a4a 100644 --- a/src/lib/netlist/nl_setup.h +++ b/src/lib/netlist/nl_setup.h @@ -186,7 +186,7 @@ namespace netlist source_netlist_t() = default; - COPYASSIGNMOVE(source_netlist_t, delete) + PCOPYASSIGNMOVE(source_netlist_t, delete) ~source_netlist_t() noexcept override = default; virtual bool parse(nlparse_t &setup, const pstring &name); @@ -200,7 +200,7 @@ namespace netlist source_data_t() = default; - COPYASSIGNMOVE(source_data_t, delete) + PCOPYASSIGNMOVE(source_data_t, delete) ~source_data_t() noexcept override = default; }; @@ -373,7 +373,7 @@ namespace netlist explicit setup_t(netlist_state_t &nlstate); ~setup_t() noexcept = default; - COPYASSIGNMOVE(setup_t, delete) + PCOPYASSIGNMOVE(setup_t, delete) netlist_state_t &nlstate() { return m_nlstate; } const netlist_state_t &nlstate() const { return m_nlstate; } diff --git a/src/lib/netlist/nltypes.h b/src/lib/netlist/nltypes.h index e71f4d547ac..ed6a4dcf6b0 100644 --- a/src/lib/netlist/nltypes.h +++ b/src/lib/netlist/nltypes.h @@ -52,7 +52,7 @@ namespace netlist callbacks_t() = default; virtual ~callbacks_t() = default; - COPYASSIGNMOVE(callbacks_t, default) + PCOPYASSIGNMOVE(callbacks_t, default) /// \brief logging callback. /// diff --git a/src/lib/netlist/plib/mat_cr.h b/src/lib/netlist/plib/mat_cr.h index 2fba7f83260..11c0444fac5 100644 --- a/src/lib/netlist/plib/mat_cr.h +++ b/src/lib/netlist/plib/mat_cr.h @@ -36,7 +36,7 @@ namespace plib static constexpr const int NSQ = (N < 0 ? -N * N : N * N); static constexpr const int Np1 = (N == 0) ? 0 : (N < 0 ? N - 1 : N + 1); - COPYASSIGNMOVE(pmatrix_cr_t, default) + PCOPYASSIGNMOVE(pmatrix_cr_t, default) enum constants_e { @@ -249,7 +249,7 @@ namespace plib using base = B; using index_type = typename base::index_type; - COPYASSIGNMOVE(pGEmatrix_cr_t, default) + PCOPYASSIGNMOVE(pGEmatrix_cr_t, default) explicit pGEmatrix_cr_t(std::size_t n) : B(n) @@ -483,7 +483,7 @@ namespace plib using base = B; using index_type = typename base::index_type; - COPYASSIGNMOVE(pLUmatrix_cr_t, default) + PCOPYASSIGNMOVE(pLUmatrix_cr_t, default) explicit pLUmatrix_cr_t(std::size_t n) : B(n) diff --git a/src/lib/netlist/plib/parray.h b/src/lib/netlist/plib/parray.h index 05f3b0ce3f4..43e723b00f4 100644 --- a/src/lib/netlist/plib/parray.h +++ b/src/lib/netlist/plib/parray.h @@ -165,7 +165,7 @@ namespace plib { } } - COPYASSIGNMOVE(parray2D, default) + PCOPYASSIGNMOVE(parray2D, default) ~parray2D() noexcept = default; diff --git a/src/lib/netlist/plib/pchrono.h b/src/lib/netlist/plib/pchrono.h index 08738f98a9d..ec668b227a9 100644 --- a/src/lib/netlist/plib/pchrono.h +++ b/src/lib/netlist/plib/pchrono.h @@ -196,7 +196,7 @@ namespace plib { explicit guard_t(timer &m) noexcept : m_m(m) { m_m.m_time -= T::start(); } ~guard_t() noexcept { m_m.m_time += T::stop(); ++m_m.m_count; } - COPYASSIGNMOVE(guard_t, default) + PCOPYASSIGNMOVE(guard_t, default) private: timer &m_m; @@ -232,7 +232,7 @@ namespace plib { struct guard_t { guard_t() = default; - COPYASSIGNMOVE(guard_t, default) + PCOPYASSIGNMOVE(guard_t, default) // using default constructor will trigger warning on // unused local variable. diff --git a/src/lib/netlist/plib/pdynlib.h b/src/lib/netlist/plib/pdynlib.h index 50cab95be51..8965cae8181 100644 --- a/src/lib/netlist/plib/pdynlib.h +++ b/src/lib/netlist/plib/pdynlib.h @@ -16,14 +16,15 @@ namespace plib { // pdynlib: dynamic loading of libraries ... // ---------------------------------------------------------------------------------------- - class dynlib_base : public nocopyassignmove + class dynlib_base { public: explicit dynlib_base() : m_is_loaded(false) { } virtual ~dynlib_base() = default; - COPYASSIGNMOVE(dynlib_base, delete) + PCOPYASSIGN(dynlib_base, delete) + PMOVEASSIGN(dynlib_base, default) bool isLoaded() const { return m_is_loaded; } @@ -46,10 +47,8 @@ namespace plib { ~dynlib() override; - COPYASSIGN(dynlib, delete) - - dynlib(dynlib &&) noexcept = default; - dynlib &operator=(dynlib &&) noexcept = default; + PCOPYASSIGN(dynlib, delete) + PMOVEASSIGN(dynlib, default) protected: void *getsym_p(const pstring &name) const noexcept override; diff --git a/src/lib/netlist/plib/pexception.h b/src/lib/netlist/plib/pexception.h index 703e407eae7..91ec6e65cca 100644 --- a/src/lib/netlist/plib/pexception.h +++ b/src/lib/netlist/plib/pexception.h @@ -106,7 +106,7 @@ namespace plib { public: explicit fpsignalenabler(unsigned fpexceptions); - COPYASSIGNMOVE(fpsignalenabler, delete) + PCOPYASSIGNMOVE(fpsignalenabler, delete) ~fpsignalenabler(); diff --git a/src/lib/netlist/plib/pfmtlog.h b/src/lib/netlist/plib/pfmtlog.h index 8b7b2974ce4..27e6211d8f1 100644 --- a/src/lib/netlist/plib/pfmtlog.h +++ b/src/lib/netlist/plib/pfmtlog.h @@ -195,7 +195,7 @@ namespace plib { { } - COPYASSIGNMOVE(pfmt, default) + PCOPYASSIGNMOVE(pfmt, default) ~pfmt() noexcept = default; @@ -208,12 +208,7 @@ namespace plib { template <typename T> typename std::enable_if<plib::is_floating_point<T>::value, pfmt &>::type e(const T &x) {return format_element('e', x); } -#if 0 - #if PUSE_FLOAT128 - // FIXME: should use quadmath_snprintf - pfmt & e(const FLOAT128 &x) {return format_element('e', static_cast<long double>(x)); } - #endif -#endif + template <typename T> typename std::enable_if<plib::is_floating_point<T>::value, pfmt &>::type g(const T &x) {return format_element('g', x); } @@ -317,7 +312,7 @@ namespace plib { public: explicit pfmt_writer_t() : m_enabled(true) { } - COPYASSIGNMOVE(pfmt_writer_t, delete) + PCOPYASSIGNMOVE(pfmt_writer_t, delete) // runtime enable template<bool enabled, typename... Args> @@ -370,7 +365,7 @@ namespace plib { public: explicit plog_channel(T &b) : pfmt_writer_t<plog_channel, build_enabled>(), m_base(b) { } - COPYASSIGNMOVE(plog_channel, delete) + PCOPYASSIGNMOVE(plog_channel, delete) ~plog_channel() noexcept = default; @@ -398,7 +393,7 @@ namespace plib { fatal(proxy) {} - COPYASSIGNMOVE(plog_base, default) + PCOPYASSIGNMOVE(plog_base, default) virtual ~plog_base() noexcept = default; plog_channel<T, plog_level::DEBUG, debug_enabled> debug; diff --git a/src/lib/netlist/plib/plists.h b/src/lib/netlist/plib/plists.h index a5340193b3c..3ad182e2e3e 100644 --- a/src/lib/netlist/plib/plists.h +++ b/src/lib/netlist/plib/plists.h @@ -51,7 +51,7 @@ namespace plib { { } - COPYASSIGNMOVE(uninitialised_array_t, delete) + PCOPYASSIGNMOVE(uninitialised_array_t, delete) ~uninitialised_array_t() noexcept { if (m_initialized>=N) @@ -115,7 +115,7 @@ namespace plib { constexpr element_t() : m_next(nullptr), m_prev(nullptr) {} ~element_t() noexcept = default; - COPYASSIGNMOVE(element_t, delete) + PCOPYASSIGNMOVE(element_t, delete) constexpr LC *next() const noexcept { return m_next; } constexpr LC *prev() const noexcept { return m_prev; } @@ -284,7 +284,7 @@ namespace plib { // Use TS = true for a threadsafe queue template <class T, bool TS> - class timed_queue_linear : nocopyassignmove + class timed_queue_linear { public: @@ -294,6 +294,8 @@ namespace plib { clear(); } + PCOPYASSIGNMOVE(timed_queue_linear, delete) + std::size_t capacity() const noexcept { return m_list.capacity() - 1; } bool empty() const noexcept { return (m_end == &m_list[1]); } @@ -412,7 +414,7 @@ namespace plib { }; template <class T, bool TS> - class timed_queue_heap : nocopyassignmove + class timed_queue_heap { public: @@ -427,6 +429,8 @@ namespace plib { clear(); } + PCOPYASSIGNMOVE(timed_queue_heap, delete) + std::size_t capacity() const noexcept { return m_list.capacity(); } bool empty() const noexcept { return &m_list[0] == m_end; } diff --git a/src/lib/netlist/plib/pmain.h b/src/lib/netlist/plib/pmain.h index a0f61ef7ce9..fa57363926d 100644..100755 --- a/src/lib/netlist/plib/pmain.h +++ b/src/lib/netlist/plib/pmain.h @@ -35,7 +35,7 @@ namespace plib { public: app(); - COPYASSIGNMOVE(app, delete) + PCOPYASSIGNMOVE(app, delete) virtual ~app() = default; diff --git a/src/lib/netlist/plib/pmempool.h b/src/lib/netlist/plib/pmempool.h index aab6448258b..60eba09ccce 100644 --- a/src/lib/netlist/plib/pmempool.h +++ b/src/lib/netlist/plib/pmempool.h @@ -47,7 +47,7 @@ namespace plib { { } - COPYASSIGNMOVE(mempool, delete) + PCOPYASSIGNMOVE(mempool, delete) ~mempool() { @@ -63,13 +63,7 @@ namespace plib { //::operator delete(b->m_data); } } -#if 0 - static inline mempool &instance() - { - static mempool s_mempool; - return s_mempool; - } -#endif + void *allocate(size_t align, size_t size) { block *b = nullptr; @@ -216,7 +210,7 @@ namespace plib { { info(block *b, size_type p) : m_block(b), m_pos(p) { } ~info() = default; - COPYASSIGNMOVE(info, default) + PCOPYASSIGNMOVE(info, default) block * m_block; size_type m_pos; diff --git a/src/lib/netlist/plib/poptions.h b/src/lib/netlist/plib/poptions.h index fa85edc4d5a..1a085262716 100644..100755 --- a/src/lib/netlist/plib/poptions.h +++ b/src/lib/netlist/plib/poptions.h @@ -25,7 +25,7 @@ namespace plib { option_base(options &parent, const pstring &help); virtual ~option_base() = default; - COPYASSIGNMOVE(option_base, delete) + PCOPYASSIGNMOVE(option_base, delete) pstring help() const { return m_help; } private: @@ -217,13 +217,15 @@ namespace plib { {} }; - class options : public nocopyassignmove + class options { public: options(); explicit options(option **o); + PCOPYASSIGNMOVE(options, delete) + void register_option(option_base *opt); int parse(int argc, char **argv); diff --git a/src/lib/netlist/plib/ppreprocessor.h b/src/lib/netlist/plib/ppreprocessor.h index 30af8d936f2..3db793d8368 100644 --- a/src/lib/netlist/plib/ppreprocessor.h +++ b/src/lib/netlist/plib/ppreprocessor.h @@ -44,7 +44,7 @@ namespace plib { explicit ppreprocessor(psource_collection_t<> &sources, defines_map_type *defines = nullptr); - COPYASSIGN(ppreprocessor, delete) + PCOPYASSIGN(ppreprocessor, delete) ppreprocessor &operator=(ppreprocessor &&src) = delete; ppreprocessor(ppreprocessor &&s) noexcept @@ -87,7 +87,7 @@ namespace plib { explicit readbuffer(ppreprocessor *strm) : m_strm(strm), m_buf() { setg(nullptr, nullptr, nullptr); } readbuffer(readbuffer &&rhs) noexcept : m_strm(rhs.m_strm), m_buf() {} - COPYASSIGN(readbuffer, delete) + PCOPYASSIGN(readbuffer, delete) readbuffer &operator=(readbuffer &&src) = delete; ~readbuffer() override = default; diff --git a/src/lib/netlist/plib/pstate.h b/src/lib/netlist/plib/pstate.h index 151e50a4aae..5f93c539ba0 100644 --- a/src/lib/netlist/plib/pstate.h +++ b/src/lib/netlist/plib/pstate.h @@ -65,7 +65,7 @@ public: protected: callback_t() = default; virtual ~callback_t() = default; - COPYASSIGNMOVE(callback_t, default) + PCOPYASSIGNMOVE(callback_t, default) }; struct entry_t diff --git a/src/lib/netlist/plib/pstream.h b/src/lib/netlist/plib/pstream.h index f5f26bf19e2..04ca9e4344c 100644 --- a/src/lib/netlist/plib/pstream.h +++ b/src/lib/netlist/plib/pstream.h @@ -36,7 +36,7 @@ class putf8_reader { public: - COPYASSIGN(putf8_reader, delete) + PCOPYASSIGN(putf8_reader, delete) virtual ~putf8_reader() = default; putf8_reader(putf8_reader &&rhs) noexcept @@ -118,7 +118,7 @@ public: putf8_writer(putf8_writer &&src) noexcept : m_strm(src.m_strm) {} - COPYASSIGN(putf8_writer, delete) + PCOPYASSIGN(putf8_writer, delete) putf8_writer &operator=(putf8_writer &&src) = delete; virtual ~putf8_writer() = default; @@ -155,7 +155,7 @@ public: { } - COPYASSIGNMOVE(putf8_fmt_writer, delete) + PCOPYASSIGNMOVE(putf8_fmt_writer, delete) ~putf8_fmt_writer() override = default; @@ -179,7 +179,7 @@ public: explicit pbinary_writer(std::ostream &strm) : m_strm(strm) {} pbinary_writer(pbinary_writer &&src) noexcept : m_strm(src.m_strm) {} - COPYASSIGN(pbinary_writer, delete) + PCOPYASSIGN(pbinary_writer, delete) pbinary_writer &operator=(pbinary_writer &&src) = delete; virtual ~pbinary_writer() = default; @@ -216,7 +216,7 @@ public: explicit pbinary_reader(std::istream &strm) : m_strm(strm) {} pbinary_reader(pbinary_reader &&src) noexcept : m_strm(src.m_strm) { } - COPYASSIGN(pbinary_reader, delete) + PCOPYASSIGN(pbinary_reader, delete) pbinary_reader &operator=(pbinary_reader &&src) = delete; virtual ~pbinary_reader() = default; diff --git a/src/lib/netlist/plib/ptokenizer.h b/src/lib/netlist/plib/ptokenizer.h index 42858aa76e4..b37dad3ec86 100644 --- a/src/lib/netlist/plib/ptokenizer.h +++ b/src/lib/netlist/plib/ptokenizer.h @@ -35,7 +35,7 @@ namespace plib { m_source_location.emplace_back(plib::source_location("Unknown", 0)); } - COPYASSIGNMOVE(ptokenizer, delete) + PCOPYASSIGNMOVE(ptokenizer, delete) virtual ~ptokenizer() = default; diff --git a/src/lib/netlist/plib/ptypes.h b/src/lib/netlist/plib/ptypes.h index 7231dcd2c0a..64c1560719e 100644 --- a/src/lib/netlist/plib/ptypes.h +++ b/src/lib/netlist/plib/ptypes.h @@ -19,16 +19,20 @@ #endif // noexcept on move operator -> issue with macosx clang -#define COPYASSIGNMOVE(name, def) \ +#define PCOPYASSIGNMOVE(name, def) \ name(const name &) = def; \ name(name &&) noexcept = def; \ name &operator=(const name &) = def; \ name &operator=(name &&) noexcept = def; -#define COPYASSIGN(name, def) \ +#define PCOPYASSIGN(name, def) \ name(const name &) = def; \ name &operator=(const name &) = def; \ +#define PMOVEASSIGN(name, def) \ + name(name &&) noexcept = def; \ + name &operator=(name &&) noexcept = def; + namespace plib { template<typename T> struct is_integral : public std::is_integral<T> { }; @@ -81,32 +85,6 @@ namespace plib #endif //============================================================ - // prevent implicit copying - //============================================================ - - struct nocopyassignmove - { - nocopyassignmove(const nocopyassignmove &) = delete; - nocopyassignmove(nocopyassignmove &&) noexcept = delete; - nocopyassignmove &operator=(const nocopyassignmove &) = delete; - nocopyassignmove &operator=(nocopyassignmove &&) noexcept = delete; - protected: - nocopyassignmove() = default; - ~nocopyassignmove() noexcept = default; - }; - - struct nocopyassign - { - nocopyassign(const nocopyassign &) = delete; - nocopyassign &operator=(const nocopyassign &) = delete; - protected: - nocopyassign() = default; - ~nocopyassign() noexcept = default; - nocopyassign(nocopyassign &&) noexcept = default; - nocopyassign &operator=(nocopyassign &&) noexcept = default; - }; - - //============================================================ // Avoid unused variable warnings //============================================================ template<typename... Ts> diff --git a/src/lib/netlist/plib/putil.h b/src/lib/netlist/plib/putil.h index c7391c26035..ef0ac86af1c 100644 --- a/src/lib/netlist/plib/putil.h +++ b/src/lib/netlist/plib/putil.h @@ -136,7 +136,7 @@ namespace plib psource_t() noexcept = default; - COPYASSIGNMOVE(psource_t, delete) + PCOPYASSIGNMOVE(psource_t, delete) virtual ~psource_t() noexcept = default; @@ -159,7 +159,7 @@ namespace plib : m_name(std::move(name)), m_str(std::move(str)) {} - COPYASSIGNMOVE(psource_str_t, delete) + PCOPYASSIGNMOVE(psource_str_t, delete) ~psource_str_t() noexcept override = default; typename TS::stream_ptr stream(const pstring &name) override @@ -185,7 +185,7 @@ namespace plib psource_collection_t() noexcept = default; - COPYASSIGNMOVE(psource_collection_t, delete) + PCOPYASSIGNMOVE(psource_collection_t, delete) virtual ~psource_collection_t() noexcept = default; void add_source(source_type &&src) diff --git a/src/lib/netlist/prg/nlwav.cpp b/src/lib/netlist/prg/nlwav.cpp index 7a5e49c34c0..c8f0619a58b 100644 --- a/src/lib/netlist/prg/nlwav.cpp +++ b/src/lib/netlist/prg/nlwav.cpp @@ -38,7 +38,7 @@ public: write(m_data); } - COPYASSIGNMOVE(wav_t, delete) + PCOPYASSIGNMOVE(wav_t, delete) ~wav_t() { diff --git a/src/lib/netlist/tools/nl_convert.h b/src/lib/netlist/tools/nl_convert.h index 14d65ca3223..f46c4ab9fae 100644..100755 --- a/src/lib/netlist/tools/nl_convert.h +++ b/src/lib/netlist/tools/nl_convert.h @@ -24,7 +24,7 @@ class nl_convert_base_t public: using str_list = std::vector<pstring>; - COPYASSIGNMOVE(nl_convert_base_t, delete) + PCOPYASSIGNMOVE(nl_convert_base_t, delete) virtual ~nl_convert_base_t(); |