From 101b70147f14a1b249d4edb9349a51c776e06e83 Mon Sep 17 00:00:00 2001 From: Ryan Macnak Date: Fri, 21 Feb 2020 12:57:06 -0800 Subject: [PATCH] Fix some compiler warnings in newer versions of Clang. (flutter/engine#16733) --- engine/src/flutter/lib/ui/plugins/callback_cache.h | 4 ++-- .../darwin/macos/framework/Source/FlutterViewController.mm | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/engine/src/flutter/lib/ui/plugins/callback_cache.h b/engine/src/flutter/lib/ui/plugins/callback_cache.h index d102888b99..84a2606c37 100644 --- a/engine/src/flutter/lib/ui/plugins/callback_cache.h +++ b/engine/src/flutter/lib/ui/plugins/callback_cache.h @@ -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: diff --git a/engine/src/flutter/shell/platform/darwin/macos/framework/Source/FlutterViewController.mm b/engine/src/flutter/shell/platform/darwin/macos/framework/Source/FlutterViewController.mm index 926c0cafd6..e9c26be8e0 100644 --- a/engine/src/flutter/shell/platform/darwin/macos/framework/Source/FlutterViewController.mm +++ b/engine/src/flutter/shell/platform/darwin/macos/framework/Source/FlutterViewController.mm @@ -404,11 +404,11 @@ static void CommonInit(FlutterViewController* controller) { NSPoint locationInBackingCoordinates = [self.view convertPointToBacking:locationInView]; FlutterPointerEvent flutterEvent = { .struct_size = sizeof(flutterEvent), - .device_kind = kFlutterPointerDeviceKindMouse, .phase = phase, + .timestamp = static_cast(event.timestamp * NSEC_PER_MSEC), .x = locationInBackingCoordinates.x, .y = -locationInBackingCoordinates.y, // convertPointToBacking makes this negative. - .timestamp = static_cast(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, };