Fix shadowing variable in [ASTextNode setTextContainerInset] (#3188)

This commit is contained in:
Michael Schneider
2017-03-15 16:44:50 -07:00
committed by Garrett Moon
parent bc05227631
commit 39a2d7eebb

View File

@@ -305,14 +305,12 @@ static NSArray *DefaultLinkAttributeNames = @[ NSLinkAttributeName ];
- (void)setTextContainerInset:(UIEdgeInsets)textContainerInset
{
BOOL needsUpdate = NO;
{
ASDN::MutexLocker l(__instanceLock__);
__instanceLock__.lock();
BOOL needsUpdate = !UIEdgeInsetsEqualToEdgeInsets(textContainerInset, _textContainerInset);
if (needsUpdate) {
_textContainerInset = textContainerInset;
}
}
__instanceLock__.unlock();
if (needsUpdate) {
[self setNeedsLayout];