From c443b4c264201f2c36abba6d680261dc1c0c4bdf Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 11 Nov 2017 15:30:22 +0100 Subject: [PATCH] Don't use multi-character constants for portability reasons Instead of using numeric constants for MinGW and character constants otherwise, just always use the former as this code can also be compiled with non-MinGW gcc when building under Cygwin and this results in the same warnings as for MinGW. Additionally, it's not guaranteed that other MSW compilers actually support multi-character constants at all, even if they don't warn about them, so just avoid them completely. --- src/msw/mediactrl_qt.cpp | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/src/msw/mediactrl_qt.cpp b/src/msw/mediactrl_qt.cpp index e2087e7ba4..5bc3e37c4a 100644 --- a/src/msw/mediactrl_qt.cpp +++ b/src/msw/mediactrl_qt.cpp @@ -101,14 +101,11 @@ typedef struct ComponentInstanceRecord * ComponentInstance; #define MovieController ComponentInstance #ifndef URLDataHandlerSubType -#if defined(__MINGW32__) -// use magic numbers for compilers which complain about multicharacter integers -const OSType URLDataHandlerSubType = 1970433056; -const OSType VisualMediaCharacteristic = 1702454643; -#else -const OSType URLDataHandlerSubType = 'url '; -const OSType VisualMediaCharacteristic = 'eyes'; -#endif +// Under Mac this would be defined as 'url ' and 'eyes' multi-character +// constants respectively (translate each byte to ASCII to see it), but this is +// not accepted by non-Mac compilers, so use the numeric constants instead. +const OSType URLDataHandlerSubType = 0x75726c20; +const OSType VisualMediaCharacteristic = 0x65796573; #endif struct FSSpec