Fix c++11-narrowing error when using clang on Windows

Case value 0xfffffd9f results in the following error:
error: case value evaluates to 4294966687, which cannot be narrowed to type
'DISPID' (aka 'long') [-Wc++11-narrowing]
This commit is contained in:
Maarten Bent 2018-08-16 20:08:56 +02:00
parent c6af757edb
commit fd81223a2f

View File

@ -1530,7 +1530,9 @@ void wxAMMediaBackend::Move(int WXUNUSED(x), int WXUNUSED(y),
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
void wxAMMediaEvtHandler::OnActiveX(wxActiveXEvent& event) void wxAMMediaEvtHandler::OnActiveX(wxActiveXEvent& event)
{ {
switch(event.GetDispatchId()) // cast to unsigned long to fix narrowing error with case 0xfffffd9f
// when using clang
switch (static_cast<unsigned long>(event.GetDispatchId()))
{ {
case 0x00000001: // statechange in IActiveMovie case 0x00000001: // statechange in IActiveMovie
case 0x00000bc4: // playstatechange in IMediaPlayer case 0x00000bc4: // playstatechange in IMediaPlayer