mirror of
https://github.com/holub/mame
synced 2025-06-01 10:31:48 +03:00
snes_snd.c and mos6560.c assert fix (proper way this time) (no whatsnew) [Miodrag Milanovic]
This commit is contained in:
parent
cb8e95bd9f
commit
d8383fc2ce
@ -125,6 +125,7 @@ INLINE mos6560_state *get_safe_token( running_device *device )
|
|||||||
assert(device != NULL);
|
assert(device != NULL);
|
||||||
assert(device->token != NULL);
|
assert(device->token != NULL);
|
||||||
assert(device->type == SOUND);
|
assert(device->type == SOUND);
|
||||||
|
assert(sound_get_type(device) == MOS656X);
|
||||||
|
|
||||||
return (mos6560_state *)device->token;
|
return (mos6560_state *)device->token;
|
||||||
}
|
}
|
||||||
@ -132,7 +133,9 @@ INLINE mos6560_state *get_safe_token( running_device *device )
|
|||||||
INLINE const mos6560_interface *get_interface( running_device *device )
|
INLINE const mos6560_interface *get_interface( running_device *device )
|
||||||
{
|
{
|
||||||
assert(device != NULL);
|
assert(device != NULL);
|
||||||
assert((device->type == SOUND));
|
assert(device->type == SOUND);
|
||||||
|
assert(sound_get_type(device) == MOS656X);
|
||||||
|
|
||||||
return (const mos6560_interface *) device->baseconfig().static_config;
|
return (const mos6560_interface *) device->baseconfig().static_config;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -234,8 +234,9 @@ struct _snes_sound_state
|
|||||||
INLINE snes_sound_state *get_safe_token( running_device *device )
|
INLINE snes_sound_state *get_safe_token( running_device *device )
|
||||||
{
|
{
|
||||||
assert(device != NULL);
|
assert(device != NULL);
|
||||||
assert(device->token != NULL);
|
assert(device->token != NULL);
|
||||||
assert(device->type == SNES_SPC);
|
assert(device->type == SOUND);
|
||||||
|
assert(sound_get_type(device) == SNES_SPC);
|
||||||
|
|
||||||
return (snes_sound_state *)device->token;
|
return (snes_sound_state *)device->token;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user