Skip to content

Commit 39a2d7e

Browse files
maickigarrettmoon
authored andcommitted
Fix shadowing variable in [ASTextNode setTextContainerInset] (facebookarchive#3188)
1 parent bc05227 commit 39a2d7e

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

Source/ASTextNode.mm

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -305,14 +305,12 @@ - (ASTextKitAttributes)_rendererAttributes
305305

306306
- (void)setTextContainerInset:(UIEdgeInsets)textContainerInset
307307
{
308-
BOOL needsUpdate = NO;
309-
{
310-
ASDN::MutexLocker l(__instanceLock__);
308+
__instanceLock__.lock();
311309
BOOL needsUpdate = !UIEdgeInsetsEqualToEdgeInsets(textContainerInset, _textContainerInset);
312310
if (needsUpdate) {
313311
_textContainerInset = textContainerInset;
314312
}
315-
}
313+
__instanceLock__.unlock();
316314

317315
if (needsUpdate) {
318316
[self setNeedsLayout];

0 commit comments

Comments
 (0)