mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 678016 - Fix c++0x initializer list error found by clang; r=josh
Add explict casts to short. ::Point is a OS provided data type, so we cannot change it. I could try adding a nsShortPoint type and have WidgetToScreenOffset to return it, but that is a virtual method used in other OSs, so doing the cast looked like the best solution.
This commit is contained in:
parent
e7a2202774
commit
3e1d86aa57
@ -1942,7 +1942,8 @@ nsEventStatus nsPluginInstanceOwner::ProcessEvent(const nsGUIEvent& anEvent)
|
||||
presContext->AppUnitsToDevPixels(pt.y));
|
||||
#ifndef NP_NO_CARBON
|
||||
nsIntPoint geckoScreenCoords = mWidget->WidgetToScreenOffset();
|
||||
::Point carbonPt = { ptPx.y + geckoScreenCoords.y, ptPx.x + geckoScreenCoords.x };
|
||||
::Point carbonPt = { static_cast<short>(ptPx.y + geckoScreenCoords.y),
|
||||
static_cast<short>(ptPx.x + geckoScreenCoords.x) };
|
||||
if (eventModel == NPEventModelCarbon) {
|
||||
if (event && anEvent.eventStructType == NS_MOUSE_EVENT) {
|
||||
static_cast<EventRecord*>(event)->where = carbonPt;
|
||||
|
Loading…
Reference in New Issue
Block a user