Add parentheses around target of simple DWORD casts

s/(\s*DWORD\s*)\s*\([&+-]\?\)\([[:alnum:]_.]\+\s*->\s*\)*\([[:alnum:]_.]\+\)\(\s*\([];+>)*\/^%,|&<>]\)\|$\|\(\s*-\s*[^>]\)\)/(DWORD)(\1\2\3)\4/g
This commit is contained in:
Kp 2016-07-08 04:14:58 +00:00
parent 59fb7fa4cb
commit 2bc994e673

View file

@ -313,7 +313,7 @@ static int fill_buffer(hmp_file *hmp) {
} else {
*(p++) = ev.delta;
*(p++) = 0;
*(p++) = (((DWORD)MEVT_SHORTMSG) << 24) |
*(p++) = (((DWORD)(MEVT_SHORTMSG)) << 24) |
((DWORD)ev.msg[0]) |
(((DWORD)ev.msg[1]) << 8) |
(((DWORD)ev.msg[2]) << 16);
@ -398,7 +398,7 @@ static void setup_tempo(hmp_file *hmp, unsigned long tempo) {
unsigned int *p = reinterpret_cast<unsigned int *>(mhdr->lpData + mhdr->dwBytesRecorded);
*(p++) = 0;
*(p++) = 0;
*(p++) = (((DWORD)MEVT_TEMPO)<<24) | tempo;
*(p++) = (((DWORD)(MEVT_TEMPO))<<24) | tempo;
mhdr->dwBytesRecorded += 12;
}