[macos] early return to suppress clang-tidy warning (flutter/engine#56588)
If we disable the NSAssert during release mode, this code will continue after NSAssert failure, which will then pass a `nil` value into a dictionary (which cannot have a nil value), hence the clang-tidy warning here https://github.com/flutter/engine/pull/53005#issuecomment-2140975126 *List which issues are fixed by this PR. You must list at least one issue.* https://github.com/flutter/flutter/issues/148279 https://github.com/flutter/flutter/issues/157837 *If you had to change anything in the [flutter/tests] repo, include a link to the migration guide as per the [breaking change policy].* [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
This commit is contained in:
parent
08b52b491b
commit
453afd650f
@ -131,9 +131,12 @@
|
||||
return;
|
||||
}
|
||||
break;
|
||||
default: {
|
||||
default:
|
||||
[[unlikely]] {
|
||||
NSAssert(false, @"Unexpected key event type (got %lu).", event.type);
|
||||
callback(false);
|
||||
// This should not happen. Return to suppress clang-tidy warning on `type` being nil.
|
||||
return;
|
||||
}
|
||||
}
|
||||
_previouslyPressedFlags = modifierFlags;
|
||||
|
Loading…
x
Reference in New Issue
Block a user