Skip to content

Commit

Permalink
Fix some compiler warnings in newer versions of Clang. (flutter#16733)
Browse files Browse the repository at this point in the history
  • Loading branch information
rmacnak-google authored Feb 21, 2020
1 parent e5091a8 commit 930a80a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/ui/plugins/callback_cache.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@

namespace flutter {

typedef struct {
struct DartCallbackRepresentation {
std::string name;
std::string class_name;
std::string library_path;
} DartCallbackRepresentation;
};

class DartCallbackCache {
public:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -404,11 +404,11 @@ - (void)dispatchMouseEvent:(NSEvent*)event phase:(FlutterPointerPhase)phase {
NSPoint locationInBackingCoordinates = [self.view convertPointToBacking:locationInView];
FlutterPointerEvent flutterEvent = {
.struct_size = sizeof(flutterEvent),
.device_kind = kFlutterPointerDeviceKindMouse,
.phase = phase,
.timestamp = static_cast<size_t>(event.timestamp * NSEC_PER_MSEC),
.x = locationInBackingCoordinates.x,
.y = -locationInBackingCoordinates.y, // convertPointToBacking makes this negative.
.timestamp = static_cast<size_t>(event.timestamp * NSEC_PER_MSEC),
.device_kind = kFlutterPointerDeviceKindMouse,
// If a click triggered a synthesized kAdd, don't pass the buttons in that event.
.buttons = phase == kAdd ? 0 : _mouseState.buttons,
};
Expand Down

0 comments on commit 930a80a

Please sign in to comment.