summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author couriersud <couriersud@gmx.org>2020-06-10 01:08:27 +0200
committer couriersud <couriersud@gmx.org>2020-06-10 01:25:01 +0200
commit8d1afead8177ce8ff37c5b3e71d5b2bb955a0509 (patch)
tree371f75d7266148674adcbeb644784d04515e9876
parent71c6247e7ca761f6acb80ffbb70f0019b4a5bc59 (diff)
netlist: fix win32 compile (nw)
... and all targets without INT128 support.
-rw-r--r--src/devices/machine/netlist.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/devices/machine/netlist.cpp b/src/devices/machine/netlist.cpp
index 1e290a2d29e..a47d453762d 100644
--- a/src/devices/machine/netlist.cpp
+++ b/src/devices/machine/netlist.cpp
@@ -791,17 +791,19 @@ void netlist_mame_stream_output_device::set_params(int channel, const char *out_
///
struct save_helper
{
- save_helper(device_t *dev, pstring prefix)
+ save_helper(device_t *dev, const pstring &prefix)
: m_device(dev), m_prefix(prefix)
{}
- template<typename T>
- void save_item(T &&item, pstring name)
+ template<typename T, typename X = void *>
+ void save_item(T &&item, const pstring &name, X = nullptr)
{
m_device->save_item(item, (m_prefix + "_" + name).c_str());
}
- void save_item(std::enable_if_t<plib::compile_info::has_int128::value,INT128> &item, pstring name)
+ template <typename X = void *>
+ std::enable_if_t<plib::compile_info::has_int128::value && std::is_pointer<X>::value, void>
+ save_item(INT128 &item, const pstring &name, X = nullptr)
{
auto *p = reinterpret_cast<std::uint64_t *>(&item);
m_device->save_item(p[0], (m_prefix + "_" + name + "_1").c_str());