Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ASTextNode2] Simplify compare-assign check & lock _pointScaleFactors accessor #trivial #934

Merged
merged 1 commit into from
May 22, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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