From 75f1e7f86d479ba2df234d64448b5d889f666590 Mon Sep 17 00:00:00 2001 From: Vas Crabb Date: Mon, 14 May 2018 11:16:50 +1000 Subject: [PATCH] set_tag can now take things other than C strings - please don't write new legacy code (nw) --- src/devices/video/huc6261.h | 6 +++--- src/devices/video/huc6272.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/devices/video/huc6261.h b/src/devices/video/huc6261.h index f3621688d44..721ef88cc3a 100644 --- a/src/devices/video/huc6261.h +++ b/src/devices/video/huc6261.h @@ -36,9 +36,9 @@ public: // construction/destruction huc6261_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - void set_vdc1_tag(const char *tag) { m_huc6270_a.set_tag(tag); } - void set_vdc2_tag(const char *tag) { m_huc6270_b.set_tag(tag); } - void set_king_tag(const char *tag) { m_huc6272.set_tag(tag); } + template void set_vdc1_tag(T &&tag) { m_huc6270_a.set_tag(std::forward(tag)); } + template void set_vdc2_tag(T &&tag) { m_huc6270_b.set_tag(std::forward(tag)); } + template void set_king_tag(T &&tag) { m_huc6272.set_tag(std::forward(tag)); } void video_update(bitmap_rgb32 &bitmap, const rectangle &cliprect); DECLARE_READ16_MEMBER( read ); diff --git a/src/devices/video/huc6272.h b/src/devices/video/huc6272.h index 22f93c7456c..0c83e275f10 100644 --- a/src/devices/video/huc6272.h +++ b/src/devices/video/huc6272.h @@ -41,7 +41,7 @@ public: huc6272_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); template devcb_base &set_irq_changed_callback(Object &&cb) { return m_irq_changed_cb.set_callback(std::forward(cb)); } - void set_rainbow_tag(const char *tag) { m_huc6271.set_tag(tag); } + template void set_rainbow_tag(const char *tag) { m_huc6271.set_tag(std::forward(tag)); } // I/O operations DECLARE_WRITE32_MEMBER( write );