summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/imagedev/harddriv.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/imagedev/harddriv.cpp')
-rw-r--r--src/devices/imagedev/harddriv.cpp36
1 files changed, 18 insertions, 18 deletions
diff --git a/src/devices/imagedev/harddriv.cpp b/src/devices/imagedev/harddriv.cpp
index bc39d53e4b3..8b0ea459be5 100644
--- a/src/devices/imagedev/harddriv.cpp
+++ b/src/devices/imagedev/harddriv.cpp
@@ -41,11 +41,11 @@ const device_type HARDDISK = &device_creator<harddisk_image_device>;
harddisk_image_device::harddisk_image_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, HARDDISK, "Harddisk", tag, owner, clock, "harddisk_image", __FILE__),
device_image_interface(mconfig, *this),
- m_chd(NULL),
- m_hard_disk_handle(NULL),
+ m_chd(nullptr),
+ m_hard_disk_handle(nullptr),
m_device_image_load(device_image_load_delegate()),
m_device_image_unload(device_image_func_delegate()),
- m_interface(NULL)
+ m_interface(nullptr)
{
}
@@ -55,11 +55,11 @@ harddisk_image_device::harddisk_image_device(const machine_config &mconfig, cons
harddisk_image_device::harddisk_image_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source)
: device_t(mconfig, type, name, tag, owner, clock, shortname, source),
device_image_interface(mconfig, *this),
- m_chd(NULL),
- m_hard_disk_handle(NULL),
+ m_chd(nullptr),
+ m_hard_disk_handle(nullptr),
m_device_image_load(device_image_load_delegate()),
m_device_image_unload(device_image_func_delegate()),
- m_interface(NULL)
+ m_interface(nullptr)
{
}
@@ -96,17 +96,17 @@ const option_guide *harddisk_image_device::create_option_guide() const
void harddisk_image_device::device_start()
{
- m_chd = NULL;
+ m_chd = nullptr;
// try to locate the CHD from a DISK_REGION
chd_file *handle = get_disk_handle(machine(), tag());
- if (handle != NULL)
+ if (handle != nullptr)
{
m_hard_disk_handle = hard_disk_open(handle);
}
else
{
- m_hard_disk_handle = NULL;
+ m_hard_disk_handle = nullptr;
}
}
@@ -175,15 +175,15 @@ void harddisk_image_device::call_unload()
m_device_image_unload(*this);
}
- if (m_hard_disk_handle != NULL)
+ if (m_hard_disk_handle != nullptr)
{
hard_disk_close(m_hard_disk_handle);
- m_hard_disk_handle = NULL;
+ m_hard_disk_handle = nullptr;
}
m_origchd.close();
m_diffchd.close();
- m_chd = NULL;
+ m_chd = nullptr;
}
/*-------------------------------------------------
@@ -233,13 +233,13 @@ int harddisk_image_device::internal_load_hd()
{
chd_error err = CHDERR_NONE;
- m_chd = NULL;
+ m_chd = nullptr;
if (m_hard_disk_handle)
hard_disk_close(m_hard_disk_handle);
/* open the CHD file */
- if (software_entry() != NULL)
+ if (software_entry() != nullptr)
{
m_chd = get_disk_handle(device().machine(), device().subtag("harddriv").c_str());
}
@@ -264,18 +264,18 @@ int harddisk_image_device::internal_load_hd()
}
}
- if (m_chd != NULL)
+ if (m_chd != nullptr)
{
/* open the hard disk file */
m_hard_disk_handle = hard_disk_open(m_chd);
- if (m_hard_disk_handle != NULL)
+ if (m_hard_disk_handle != nullptr)
return IMAGE_INIT_PASS;
}
/* if we had an error, close out the CHD */
m_origchd.close();
m_diffchd.close();
- m_chd = NULL;
+ m_chd = nullptr;
seterror(IMAGE_ERROR_UNSPECIFIED, chd_file::error_string(err));
return IMAGE_INIT_FAIL;
@@ -290,7 +290,7 @@ int harddisk_image_device::internal_load_hd()
chd_file *harddisk_image_device::get_chd_file()
{
- chd_file *result = NULL;
+ chd_file *result = nullptr;
hard_disk_file *hd_file = get_hard_disk_file();
if (hd_file)
result = hard_disk_get_chd(hd_file);