mirror of
https://github.com/mamedev/mame.git
synced 2024-11-16 07:48:32 +01:00
machine/smioc.cpp: Cleaned up parameter bounds checking that could cause a compiler diagnostic. [R. Belmont]
This commit is contained in:
parent
c56e1f1f6b
commit
72955160b9
1 changed files with 2 additions and 8 deletions
|
@ -355,14 +355,8 @@ void smioc_device::SetDmaParameter(smioc_dma_parameter_t param, u16 value)
|
|||
{
|
||||
int address = DmaParameterAddress(param);
|
||||
|
||||
static char const *const paramNames[] = { "smiocdma_sendaddress", "smiocdma_sendlength", "smiocdma_recvaddress", "smiocdma_recvlength" };
|
||||
const char* paramName = "?";
|
||||
if (param >= 0 && param < (sizeof(paramNames) / sizeof(*paramNames)))
|
||||
{
|
||||
paramName = paramNames[param];
|
||||
}
|
||||
|
||||
WriteRamParameter("SetDmaParameter", paramName, address, value);
|
||||
static char const *const paramNames[4] = { "smiocdma_sendaddress", "smiocdma_sendlength", "smiocdma_recvaddress", "smiocdma_recvlength" };
|
||||
WriteRamParameter("SetDmaParameter", paramNames[param & 3], address, value);
|
||||
}
|
||||
|
||||
u16 smioc_device::ReadDmaParameter(smioc_dma_parameter_t param)
|
||||
|
|
Loading…
Reference in a new issue