Fix invalid cast in wxMSW AutoHANDLE::InvalidHandle()
Somehow this compiled with the previous gcc versions (as well as MSVS), but a static_cast from an integer wxUIntPtr type to a pointer HANDLE type is obviously invalid and a reinterpret_cast is needed here. This fixes compilation with g++ 8.
This commit is contained in:
@@ -145,7 +145,7 @@ protected:
|
||||
// implicitly convertible to HANDLE, which is a pointer.
|
||||
static HANDLE InvalidHandle()
|
||||
{
|
||||
return static_cast<HANDLE>(INVALID_VALUE);
|
||||
return reinterpret_cast<HANDLE>(INVALID_VALUE);
|
||||
}
|
||||
|
||||
void DoClose()
|
||||
|
Reference in New Issue
Block a user