diff options
author | Vas Crabb <vas@vastheman.com> | 2016-08-01 18:46:56 +1000 |
---|---|---|
committer | Vas Crabb <vas@vastheman.com> | 2016-08-01 18:47:22 +1000 |
commit | 15e7be7ac8e4127e9fc0f9b5c248f4a73ba85703 (patch) | |
tree | 71346f2c2d1ac08e0e9c9f4dea8f2537af380143 /src/mame/drivers/lynx.cpp | |
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/mame/drivers/lynx.cpp')
-rw-r--r-- | src/mame/drivers/lynx.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/mame/drivers/lynx.cpp b/src/mame/drivers/lynx.cpp index 1c866a91cfc..d878481b464 100644 --- a/src/mame/drivers/lynx.cpp +++ b/src/mame/drivers/lynx.cpp @@ -159,11 +159,11 @@ QUICKLOAD_LOAD_MEMBER( lynx_state, lynx ) int i; if (image.fread( header, sizeof(header)) != sizeof(header)) - return IMAGE_INIT_FAIL; + return image_init_result::FAIL; /* Check the image */ - if (!lynx_verify_cart((char*)header, LYNX_QUICKLOAD)) - return IMAGE_INIT_FAIL; + if (lynx_verify_cart((char*)header, LYNX_QUICKLOAD) != image_verify_result::PASS) + return image_init_result::FAIL; start = header[3] | (header[2]<<8); //! big endian format in file format for little endian cpu length = header[5] | (header[4]<<8); @@ -173,7 +173,7 @@ QUICKLOAD_LOAD_MEMBER( lynx_state, lynx ) if (image.fread( &data[0], length) != length) { - return IMAGE_INIT_FAIL; + return image_init_result::FAIL; } for (i = 0; i < length; i++) @@ -186,7 +186,7 @@ QUICKLOAD_LOAD_MEMBER( lynx_state, lynx ) m_maincpu->set_pc(start); - return IMAGE_INIT_PASS; + return image_init_result::PASS; } /*************************************************************************** |