Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ - (UIWindow *)_getKeyWindow
if (scene.activationState == UISceneActivationStateForegroundActive &&
[scene isKindOfClass:[UIWindowScene class]]) {
auto windowScene = (UIWindowScene *)scene;
for (UIWindow *window = nullptr in windowScene.windows) {
for (UIWindow *window in windowScene.windows) {
if (window.isKeyWindow) {
return window;
}
Expand Down
5 changes: 1 addition & 4 deletions packages/react-native/React/Fabric/AppleEventBeat.mm
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,8 @@ - (void)display
// before it executes is made safe by the owner check above.
NSMapTable<CALayer *, RCTEventBeatFlusherLayer *> *layers = layers_;
RCTExecuteOnMainQueue(^{
NSEnumerator<RCTEventBeatFlusherLayer *> *enumerator = layers.objectEnumerator;
RCTEventBeatFlusherLayer *layer = enumerator.nextObject;
while (layer != nil) {
for (RCTEventBeatFlusherLayer *layer in layers.objectEnumerator) {
[layer removeFromSuperlayer];
layer = enumerator.nextObject;
}
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ - (void)_updateModes:(id<RCTVirtualViewProtocol>)virtualView
NSArray<id<RCTVirtualViewProtocol>> *virtualViewsIt =
(virtualView != nullptr) ? @[ virtualView ] : [_virtualViews allObjects];

for (id<RCTVirtualViewProtocol> vv = nullptr in virtualViewsIt) {
for (id<RCTVirtualViewProtocol> vv in virtualViewsIt) {
CGRect rect = [vv containerRelativeRect:scrollView];

RCTVirtualViewMode mode = RCTVirtualViewModeHidden;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -757,7 +757,7 @@ - (void)prepareForRecycle

// Clean up box shadow layers to prevent cross-component contamination
if (_boxShadowLayers != nullptr) {
for (CALayer *boxShadowLayer = nullptr in _boxShadowLayers) {
for (CALayer *boxShadowLayer in _boxShadowLayers) {
[boxShadowLayer removeFromSuperlayer];
}
[_boxShadowLayers removeAllObjects];
Expand Down Expand Up @@ -817,7 +817,7 @@ - (UIView *)betterHitTest:(CGPoint)point withEvent:(UIEvent *)event
return nil;
}

for (UIView *subview = nullptr in [currentContainerView.subviews reverseObjectEnumerator]) {
for (UIView *subview in [currentContainerView.subviews reverseObjectEnumerator]) {
UIView *hitView = [subview hitTest:[subview convertPoint:point fromView:currentContainerView] withEvent:event];
if (hitView) {
return hitView;
Expand Down Expand Up @@ -975,7 +975,7 @@ - (UIView *)effectiveContentView
if (_swiftUIWrapper == nullptr) {
_swiftUIWrapper = [RCTSwiftUIContainerViewWrapper new];
UIView *swiftUIContentView = [[UIView alloc] init];
for (UIView *subview = nullptr in self.subviews) {
for (UIView *subview in self.subviews) {
[swiftUIContentView addSubview:subview];
}
swiftUIContentView.clipsToBounds = self.clipsToBounds;
Expand All @@ -993,7 +993,7 @@ - (UIView *)effectiveContentView
} else {
if (_swiftUIWrapper != nullptr) {
UIView *swiftUIContentView = _swiftUIWrapper.contentView;
for (UIView *subview = nullptr in swiftUIContentView.subviews) {
for (UIView *subview in swiftUIContentView.subviews) {
[self addSubview:subview];
}
self.clipsToBounds = swiftUIContentView.clipsToBounds;
Expand All @@ -1019,7 +1019,7 @@ - (UIView *)currentContainerView
if (_useCustomContainerView) {
if (!_containerView) {
_containerView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, self.bounds.size.width, self.bounds.size.height)];
for (UIView *subview = nullptr in effectiveContentView.subviews) {
for (UIView *subview in effectiveContentView.subviews) {
[_containerView addSubview:subview];
}
_containerView.clipsToBounds = effectiveContentView.clipsToBounds;
Expand Down Expand Up @@ -1805,10 +1805,10 @@ - (void)transferVisualPropertiesFromView:(UIView *)sourceView toView:(UIView *)d
if (_filterLayer != nullptr) {
[destinationView.layer addSublayer:_filterLayer];
}
for (CALayer *layer = nullptr in _backgroundImageLayers) {
for (CALayer *layer in _backgroundImageLayers) {
[destinationView.layer addSublayer:layer];
}
for (CALayer *layer = nullptr in _boxShadowLayers) {
for (CALayer *layer in _boxShadowLayers) {
[destinationView.layer addSublayer:layer];
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,6 @@ - (void)drawAttributedString:(AttributedString)attributedString
CGFloat baseline =
lineRect.origin.y + font.ascender + frame.origin.y;

// NOLINTNEXTLINE(cppcoreguidelines-init-variables)
for (NSString *line in lines) {
CGFloat y = 0.0f;
if ([line isEqualToString:@"underline"]) {
Expand Down
Loading