Skip to content

Commit 930a80a

Browse files
Fix some compiler warnings in newer versions of Clang. (flutter#16733)
1 parent e5091a8 commit 930a80a

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

lib/ui/plugins/callback_cache.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@
1515

1616
namespace flutter {
1717

18-
typedef struct {
18+
struct DartCallbackRepresentation {
1919
std::string name;
2020
std::string class_name;
2121
std::string library_path;
22-
} DartCallbackRepresentation;
22+
};
2323

2424
class DartCallbackCache {
2525
public:

shell/platform/darwin/macos/framework/Source/FlutterViewController.mm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -404,11 +404,11 @@ - (void)dispatchMouseEvent:(NSEvent*)event phase:(FlutterPointerPhase)phase {
404404
NSPoint locationInBackingCoordinates = [self.view convertPointToBacking:locationInView];
405405
FlutterPointerEvent flutterEvent = {
406406
.struct_size = sizeof(flutterEvent),
407-
.device_kind = kFlutterPointerDeviceKindMouse,
408407
.phase = phase,
408+
.timestamp = static_cast<size_t>(event.timestamp * NSEC_PER_MSEC),
409409
.x = locationInBackingCoordinates.x,
410410
.y = -locationInBackingCoordinates.y, // convertPointToBacking makes this negative.
411-
.timestamp = static_cast<size_t>(event.timestamp * NSEC_PER_MSEC),
411+
.device_kind = kFlutterPointerDeviceKindMouse,
412412
// If a click triggered a synthesized kAdd, don't pass the buttons in that event.
413413
.buttons = phase == kAdd ? 0 : _mouseState.buttons,
414414
};

0 commit comments

Comments
 (0)