summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/machine/lpci.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/machine/lpci.cpp')
-rw-r--r--src/devices/machine/lpci.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/devices/machine/lpci.cpp b/src/devices/machine/lpci.cpp
index 7608d40645e..d03667d5be8 100644
--- a/src/devices/machine/lpci.cpp
+++ b/src/devices/machine/lpci.cpp
@@ -89,11 +89,12 @@ const device_type PCI_BUS_LEGACY = &device_creator<pci_bus_legacy_device>;
//-------------------------------------------------
// pci_bus_legacy_device - constructor
//-------------------------------------------------
-pci_bus_legacy_device::pci_bus_legacy_device(const machine_config &mconfig, std::string tag, device_t *owner, UINT32 clock) :
+pci_bus_legacy_device::pci_bus_legacy_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
device_t(mconfig, PCI_BUS_LEGACY, "PCI Bus Legacy", tag, owner, clock, "pci_bus_legacy", __FILE__),
m_father(nullptr)
{
for (int i = 0; i < ARRAY_LENGTH(m_devtag); i++) {
+ m_devtag[i]= nullptr;
m_read_callback[i] = nullptr;
m_write_callback[i] = nullptr;
}
@@ -132,7 +133,7 @@ READ32_MEMBER( pci_bus_legacy_device::read )
}
if (LOG_PCI)
- logerror("read('%s'): offset=%d result=0x%08X\n", tag().c_str(), offset, result);
+ logerror("read('%s'): offset=%d result=0x%08X\n", tag(), offset, result);
return result;
}
@@ -164,7 +165,7 @@ WRITE32_MEMBER( pci_bus_legacy_device::write )
offset %= 2;
if (LOG_PCI)
- logerror("write('%s'): offset=%d data=0x%08X\n", tag().c_str(), offset, data);
+ logerror("write('%s'): offset=%d data=0x%08X\n", tag(), offset, data);
switch (offset)
{
@@ -262,7 +263,7 @@ void pci_bus_legacy_device::device_start()
/* find all our devices */
for (int i = 0; i < ARRAY_LENGTH(m_devtag); i++)
- if (!m_devtag[i].empty())
+ if (m_devtag[i] != nullptr)
m_device[i] = machine().device(m_devtag[i]);
if (m_father != nullptr) {