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:
Vadim Zeitlin
2018-05-27 22:56:05 +02:00
parent 81750e5b88
commit 424f64f27d

View File

@@ -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()