From 39a2d7eebbf6724772c4f5f488dfa6a67ebfa0f1 Mon Sep 17 00:00:00 2001 From: Michael Schneider Date: Wed, 15 Mar 2017 16:44:50 -0700 Subject: [PATCH] Fix shadowing variable in [ASTextNode setTextContainerInset] (#3188) --- Source/ASTextNode.mm | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Source/ASTextNode.mm b/Source/ASTextNode.mm index 1a5a98fccb..bc07a08249 100644 --- a/Source/ASTextNode.mm +++ b/Source/ASTextNode.mm @@ -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];