summaryrefslogtreecommitdiffstats
path: root/src/mame/machine/micropolis.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/machine/micropolis.cpp')
-rw-r--r--src/mame/machine/micropolis.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/mame/machine/micropolis.cpp b/src/mame/machine/micropolis.cpp
index 0555af2d1f3..a42c692718c 100644
--- a/src/mame/machine/micropolis.cpp
+++ b/src/mame/machine/micropolis.cpp
@@ -65,7 +65,7 @@ static const UINT8 track_SD[][2] = {
const device_type MICROPOLIS = &device_creator<micropolis_device>;
-micropolis_device::micropolis_device(const machine_config &mconfig, std::string tag, device_t *owner, UINT32 clock)
+micropolis_device::micropolis_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, MICROPOLIS, "MICROPOLIS", tag, owner, clock, "micropolis", __FILE__),
m_read_dden(*this),
m_write_intrq(*this),
@@ -84,6 +84,9 @@ micropolis_device::micropolis_device(const machine_config &mconfig, std::string
{
for (auto & elem : m_buffer)
elem = 0;
+
+ for (auto & elem : m_floppy_drive_tags)
+ elem = nullptr;
}
//-------------------------------------------------
@@ -117,7 +120,7 @@ void micropolis_device::device_reset()
{
for (auto & elem : m_floppy_drive_tags)
{
- if (!elem.empty())
+ if (elem)
{
legacy_floppy_image_device *img = siblingdevice<legacy_floppy_image_device>(elem);
@@ -185,7 +188,7 @@ void micropolis_device::set_drive(UINT8 drive)
if (VERBOSE)
logerror("micropolis_set_drive: $%02x\n", drive);
- if (!m_floppy_drive_tags[drive].empty())
+ if (m_floppy_drive_tags[drive])
m_drive = siblingdevice<legacy_floppy_image_device>(m_floppy_drive_tags[drive]);
}