summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/machine/diablo_hd.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/machine/diablo_hd.cpp')
-rw-r--r--src/devices/machine/diablo_hd.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/devices/machine/diablo_hd.cpp b/src/devices/machine/diablo_hd.cpp
index f833cf54504..d5147c2b3a2 100644
--- a/src/devices/machine/diablo_hd.cpp
+++ b/src/devices/machine/diablo_hd.cpp
@@ -111,14 +111,11 @@ diablo_hd_device::~diablo_hd_device()
}
#if DIABLO_DEBUG
-void diablo_hd_device::logprintf(int level, const char* format, ...)
+template <typename Format, typename... Params>
+void diablo_hd_device::logprintf(int level, Format &&fmt, Params &&... args)
{
- if (level > m_log_level)
- return;
- va_list ap;
- va_start(ap, format);
- vlogerror(format, ap);
- va_end(ap);
+ if (level <= m_log_level)
+ logerror(std::forward<Format>(fmt), std::forward<Params>(args)...);
}
#endif
@@ -126,7 +123,7 @@ void diablo_hd_device::set_sector_callback(void *cookie, void (*callback)(void *
{
if (m_sector_callback_cookie == cookie && m_sector_callback == callback)
return;
- LOG_DRIVE((0,"[DHD%u] cookie=%p callback=%p\n", m_unit, cookie, callback));
+ LOG_DRIVE((0,"[DHD%u] cookie=%p callback=%p\n", m_unit, cookie, (void *)callback));
m_sector_callback_cookie = cookie;
m_sector_callback = callback;
}