More fixes for the new clang-tidy roll on iOS targets (flutter/engine#43688)
See https://github.com/flutter/engine/pull/43661
This commit is contained in:
@@ -153,7 +153,7 @@ static NSString* const kRestorationStateAppModificationKey = @"mod-date";
|
||||
[flutterViewController.engine.navigationChannel
|
||||
invokeMethod:@"pushRouteInformation"
|
||||
arguments:@{
|
||||
@"location" : url.absoluteString,
|
||||
@"location" : url.absoluteString ?: [NSNull null],
|
||||
}];
|
||||
}
|
||||
}];
|
||||
|
||||
@@ -683,7 +683,7 @@ static constexpr int kNumProfilerSamplesPerSec = 5;
|
||||
NSString* format = [NSString stringWithUTF8String:screenshot.format.c_str()];
|
||||
NSNumber* width = @(screenshot.frame_size.fWidth);
|
||||
NSNumber* height = @(screenshot.frame_size.fHeight);
|
||||
return result(@[ width, height, format, data ]);
|
||||
return result(@[ width, height, format ?: [NSNull null], data ]);
|
||||
}];
|
||||
}
|
||||
|
||||
|
||||
@@ -161,7 +161,8 @@ void AccessibilityBridge::UpdateSemantics(
|
||||
|
||||
if (root) {
|
||||
if (!view_controller_.view.accessibilityElements) {
|
||||
view_controller_.view.accessibilityElements = @[ [root accessibilityContainer] ];
|
||||
view_controller_.view.accessibilityElements =
|
||||
@[ [root accessibilityContainer] ?: [NSNull null] ];
|
||||
}
|
||||
NSMutableArray<SemanticsObject*>* newRoutes = [[[NSMutableArray alloc] init] autorelease];
|
||||
[root collectRoutes:newRoutes];
|
||||
|
||||
@@ -223,9 +223,12 @@ std::unique_ptr<std::vector<std::string>> PlatformViewIOS::ComputePlatformResolv
|
||||
[NSMutableArray arrayWithCapacity:supported_locale_data.size() / localeDataLength];
|
||||
for (size_t i = 0; i < supported_locale_data.size(); i += localeDataLength) {
|
||||
NSDictionary<NSString*, NSString*>* dict = @{
|
||||
NSLocaleLanguageCode : [NSString stringWithUTF8String:supported_locale_data[i].c_str()],
|
||||
NSLocaleCountryCode : [NSString stringWithUTF8String:supported_locale_data[i + 1].c_str()],
|
||||
NSLocaleLanguageCode : [NSString stringWithUTF8String:supported_locale_data[i].c_str()]
|
||||
?: @"",
|
||||
NSLocaleCountryCode : [NSString stringWithUTF8String:supported_locale_data[i + 1].c_str()]
|
||||
?: @"",
|
||||
NSLocaleScriptCode : [NSString stringWithUTF8String:supported_locale_data[i + 2].c_str()]
|
||||
?: @""
|
||||
};
|
||||
[supported_locale_identifiers addObject:[NSLocale localeIdentifierFromComponents:dict]];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user