Skip to content

Commit

Permalink
[ASTextNode2] Simplify compare-assign check & lock _pointScaleFactors…
Browse files Browse the repository at this point in the history
… accessor #trivial (#934)
  • Loading branch information
appleguy authored and Adlai-Holler committed May 22, 2018
1 parent ede9a7f commit b2e5f9e
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions Source/ASTextNode2.mm
Original file line number Diff line number Diff line change
Expand Up @@ -895,8 +895,7 @@ - (CGSize)shadowOffset
- (void)setShadowOffset:(CGSize)shadowOffset
{
ASLockScopeSelf();
BOOL changed = ASCompareAssignCustom(_shadowOffset, shadowOffset, CGSizeEqualToSize);
if (changed) {
if (ASCompareAssignCustom(_shadowOffset, shadowOffset, CGSizeEqualToSize)) {
[self setNeedsDisplay];
}
}
Expand Down Expand Up @@ -944,7 +943,7 @@ - (void)setPointSizeScaleFactors:(NSArray<NSNumber *> *)scaleFactors

- (NSArray *)pointSizeScaleFactors
{
return _pointSizeScaleFactors;
return ASLockedSelf(_pointSizeScaleFactors);
}

#pragma mark - Truncation Message
Expand Down

0 comments on commit b2e5f9e

Please sign in to comment.