boostorg / winapi

Windows API declarations without <windows.h>, for internal Boost use.
64 stars 55 forks source link

Silence -Wconversion warning with GCC #88

Closed igaztanaga closed 3 years ago

igaztanaga commented 3 years ago

Some users add -Wconversion flag to detect integer promotion bugs while using Boost.Interprocess, which uses Boost.Winapi. This is a simple patch that make Boost.Interprocess -Wconversion happy, just explicitly casting the result of MAKELANGID, which internally uses a promotion to int while dealing with shorts.

Lastique commented 3 years ago

Thanks, I've committed a slightly modified version that also cleans up our custom definition of MAKELANGID_.