Skip to content

Commit 43123a4

Browse files
author
Ian Gordon
committed
Eliminate variable shadow warning in ThumbTrack
Summary: Updated to avoid a repeated use of weak reference resulted in a a shadow warning. Fixed. Test Plan: Ensure import presubmit executes cleanly as expected. Reviewers: #material_components_ios_owners, randallli Reviewed By: #material_components_ios_owners, randallli Projects: #material_components_ios Differential Revision: http://codereview.cc/D100
1 parent b339904 commit 43123a4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

components/private/ThumbTrack/src/MDCThumbTrack.m

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -621,11 +621,11 @@ - (void)setValueFromThumbPosition:(CGPoint)position isTap:(BOOL)isTap {
621621
userGenerated:YES
622622
completion:^{
623623
__strong typeof(weakSelf) strongSelf = weakSelf;
624-
__strong typeof(strongSelf->_delegate) strongDelegate = strongSelf->_delegate;
624+
__strong typeof(strongSelf->_delegate) strongBlockDelegate = strongSelf->_delegate;
625625
[strongSelf sendDiscreteChangeAction];
626-
if (strongSelf && [strongDelegate
626+
if (strongSelf && [strongBlockDelegate
627627
respondsToSelector:@selector(thumbTrack:didAnimateToValue:)]) {
628-
[strongDelegate thumbTrack:strongSelf didAnimateToValue:value];
628+
[strongBlockDelegate thumbTrack:strongSelf didAnimateToValue:value];
629629
}
630630
}];
631631
}

0 commit comments

Comments
 (0)