diff options
author | 2016-08-01 18:46:56 +1000 | |
---|---|---|
committer | 2016-08-01 18:47:22 +1000 | |
commit | 15e7be7ac8e4127e9fc0f9b5c248f4a73ba85703 (patch) | |
tree | 71346f2c2d1ac08e0e9c9f4dea8f2537af380143 /src/devices/bus/crvision | |
parent | c4c05c9735a5b956de128d6017027658b6c61a8e (diff) |
Turn image init/validate into scoped enums to avoid accidental casts to/from integer and boolean types
The image error should also be turned into a scoped enum - the menus were assuming it was the same thing as an init result
Diffstat (limited to 'src/devices/bus/crvision')
-rw-r--r-- | src/devices/bus/crvision/slot.cpp | 8 | ||||
-rw-r--r-- | src/devices/bus/crvision/slot.h | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/devices/bus/crvision/slot.cpp b/src/devices/bus/crvision/slot.cpp index e4fd9630e46..7f12a9cf5af 100644 --- a/src/devices/bus/crvision/slot.cpp +++ b/src/devices/bus/crvision/slot.cpp @@ -150,7 +150,7 @@ static const char *crvision_get_slot(int type) call load -------------------------------------------------*/ -bool crvision_cart_slot_device::call_load() +image_init_result crvision_cart_slot_device::call_load() { if (m_cart) { @@ -159,7 +159,7 @@ bool crvision_cart_slot_device::call_load() if (size > 0x4800) { seterror(IMAGE_ERROR_UNSPECIFIED, "Image extends beyond the expected size for an APF cart"); - return IMAGE_INIT_FAIL; + return image_init_result::FAIL; } m_cart->rom_alloc(size, tag()); @@ -207,10 +207,10 @@ bool crvision_cart_slot_device::call_load() printf("Type: %s\n", crvision_get_slot(m_type)); - return IMAGE_INIT_PASS; + return image_init_result::PASS; } - return IMAGE_INIT_PASS; + return image_init_result::PASS; } diff --git a/src/devices/bus/crvision/slot.h b/src/devices/bus/crvision/slot.h index 43f74dd4181..47fed8c1583 100644 --- a/src/devices/bus/crvision/slot.h +++ b/src/devices/bus/crvision/slot.h @@ -61,7 +61,7 @@ public: virtual void device_config_complete() override; // image-level overrides - virtual bool call_load() override; + virtual image_init_result call_load() override; virtual void call_unload() override {} virtual const software_list_loader &get_software_list_loader() const override { return rom_software_list_loader::instance(); } |