- fixed signedness issues in OPL code.

This commit is contained in:
Christoph Oelckers 2017-04-23 15:40:03 +02:00
parent 9308e45575
commit f9735c44de
2 changed files with 3 additions and 3 deletions

View File

@ -296,7 +296,7 @@ FString OPLMIDIDevice::GetStats()
char star[3] = { TEXTCOLOR_ESCAPE, 'A', '*' };
for (uint32_t i = 0; i < io->NumChannels; ++i)
{
if (voices[i].index == -1)
if (voices[i].index == ~0u)
{
star[1] = CR_BRICK + 'A';
}

View File

@ -140,7 +140,7 @@ void musicBlock::voiceKeyOn(uint32_t slot, uint32_t channo, GenMidiInstrument *i
// Work out the note to use. This is normally the same as
// the key, unless it is a fixed pitch instrument.
uint32_t note;
int note;
if (instrument->flags & GENMIDI_FLAG_FIXED) note = instrument->fixed_note;
else if (channo == CHAN_PERCUSSION) note = 60;
else note = key;
@ -475,6 +475,6 @@ void musicBlock::stopAllVoices()
{
for (uint32_t i = 0; i < io->NumChannels; i++)
{
if (voices[i].index >= 0) releaseVoice(i, 1);
if (voices[i].index != ~0u) releaseVoice(i, 1);
}
}