mirror of
https://github.com/holub/mame
synced 2025-06-24 05:17:04 +03:00
Changed some int's to size_t's and added assertions where we were assuming that option_resolution was a requirement
This commit is contained in:
parent
e3cb2c7d78
commit
a2ce6a9ca4
@ -114,6 +114,7 @@ bool diablo_image_device::call_create(int create_format, util::option_resolution
|
||||
UINT32 sectorsize, hunksize;
|
||||
UINT32 cylinders, heads, sectors, totalsectors;
|
||||
|
||||
assert_always(create_args != nullptr, "Expected create_args to not be nullptr");
|
||||
cylinders = create_args->lookup_int('C');
|
||||
heads = create_args->lookup_int('H');
|
||||
sectors = create_args->lookup_int('S');
|
||||
|
@ -138,6 +138,7 @@ bool harddisk_image_device::call_create(int create_format, util::option_resoluti
|
||||
UINT32 sectorsize, hunksize;
|
||||
UINT32 cylinders, heads, sectors, totalsectors;
|
||||
|
||||
assert_always(create_args != nullptr, "Expected create_args to not be nullptr");
|
||||
cylinders = create_args->lookup_int('C');
|
||||
heads = create_args->lookup_int('H');
|
||||
sectors = create_args->lookup_int('S');
|
||||
|
@ -437,9 +437,9 @@ const option_guide *option_resolution::index_option(int indx) const
|
||||
// count_options
|
||||
// -------------------------------------------------
|
||||
|
||||
int option_resolution::count_options(const option_guide *guide, const char *specification)
|
||||
size_t option_resolution::count_options(const option_guide *guide, const char *specification)
|
||||
{
|
||||
int option_count = 0;
|
||||
size_t option_count = 0;
|
||||
|
||||
while(guide->option_type != OPTIONTYPE_END)
|
||||
{
|
||||
|
@ -123,7 +123,7 @@ public:
|
||||
const option_guide *index_option(int indx) const;
|
||||
|
||||
// processing option guides
|
||||
static int count_options(const option_guide *guide, const char *specification);
|
||||
static size_t count_options(const option_guide *guide, const char *specification);
|
||||
|
||||
// processing option specifications
|
||||
static error list_ranges(const char *specification, int option_char,
|
||||
|
Loading…
Reference in New Issue
Block a user