Codechange: Fix warning about discarding qualifiers by *really* casting the variable

This commit is contained in:
Charles Pigott 2019-08-03 09:09:21 +01:00
parent b839e355ba
commit 7b400d43c1

View File

@ -83,7 +83,7 @@ static void TransmitSysex(const byte *&msg_start, size_t &remaining)
/* prepare header */ /* prepare header */
MIDIHDR *hdr = CallocT<MIDIHDR>(1); MIDIHDR *hdr = CallocT<MIDIHDR>(1);
hdr->lpData = (LPSTR)msg_start; hdr->lpData = reinterpret_cast<LPSTR>(const_cast<byte *>(msg_start));
hdr->dwBufferLength = msg_end - msg_start; hdr->dwBufferLength = msg_end - msg_start;
if (midiOutPrepareHeader(_midi.midi_out, hdr, sizeof(*hdr)) == MMSYSERR_NOERROR) { if (midiOutPrepareHeader(_midi.midi_out, hdr, sizeof(*hdr)) == MMSYSERR_NOERROR) {
/* transmit - just point directly into the data buffer */ /* transmit - just point directly into the data buffer */