From 45d4cd52a8194f2ef9e0383cfb2e2a35634af6ff Mon Sep 17 00:00:00 2001 From: Olivier Galibert Date: Thu, 16 Jun 2022 12:47:52 +0200 Subject: full xtal conversion --- src/emu/mconfig.h | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) (limited to 'src/emu/mconfig.h') diff --git a/src/emu/mconfig.h b/src/emu/mconfig.h index c6cacde581f..203c213f649 100644 --- a/src/emu/mconfig.h +++ b/src/emu/mconfig.h @@ -180,9 +180,9 @@ public: m_current_device = &device; return token(*this, device); } - device_t *device_add(const char *tag, device_type type, u32 clock); + device_t *device_add(const char *tag, device_type type, const XTAL &clock = XTAL()); template - device_t *device_add(const char *tag, Creator &&type, u32 clock) + device_t *device_add(const char *tag, Creator &&type, const XTAL &clock = XTAL()) { return device_add(tag, device_type(type), clock); } @@ -196,15 +196,9 @@ public: add_device(std::move(device), owner.second); return &result; } - template - auto device_add(const char *tag, Creator &&type, XTAL clock, Params &&... args) - { - clock.validate(std::string("Instantiating device ") + tag); - return device_add(tag, std::forward(type), clock.value(), std::forward(args)...); - } - device_t *device_replace(const char *tag, device_type type, u32 clock); + device_t *device_replace(const char *tag, device_type type, const XTAL &clock = XTAL()); template - device_t *device_replace(const char *tag, Creator &&type, u32 clock) + device_t *device_replace(const char *tag, Creator &&type, const XTAL &clock = XTAL()) { return device_replace(tag, device_type(type), clock); } @@ -218,12 +212,6 @@ public: replace_device(std::move(device), *std::get<1>(existing), std::get<2>(existing)); return &result; } - template - auto device_replace(const char *tag, Creator &&type, XTAL clock, Params &&... args) - { - clock.validate(std::string("Replacing device ") + tag); - return device_replace(tag, std::forward(type), clock.value(), std::forward(args)...); - } device_t *device_remove(const char *tag); private: -- cgit v1.2.3-70-g09d2