Correct some dereferences in as_log_verbose invocations (#1317)

This commit is contained in:
Kevin 2019-02-14 09:22:38 -08:00 committed by Adlai Holler
parent b01ebd6f5f
commit affa588654

View File

@ -331,8 +331,8 @@ ASLayoutElementStyleExtensibilityForwarding
as_log_verbose(ASLayoutLog(), "Node %@, bounds size %@, calculatedSize %@, calculatedIsDirty %d",
self,
NSStringFromCGSize(boundsSizeForLayout),
NSStringFromCGSize(_calculatedDisplayNodeLayout->layout.size),
_calculatedDisplayNodeLayout->version < _layoutVersion);
NSStringFromCGSize(_calculatedDisplayNodeLayout.layout.size),
_calculatedDisplayNodeLayout.version < _layoutVersion);
// _calculatedDisplayNodeLayout is not reusable we need to transition to a new one
[self cancelLayoutTransition];
@ -356,9 +356,9 @@ ASLayoutElementStyleExtensibilityForwarding
} else if (!nextLayout.isValid(_layoutVersion)) {
as_log_verbose(ASLayoutLog(), "Pending layout is stale.");
} else if (layoutSizeDifferentFromBounds) {
as_log_verbose(ASLayoutLog(), "Pending layout size %@ doesn't match bounds size.", NSStringFromCGSize(nextLayout->layout.size));
as_log_verbose(ASLayoutLog(), "Pending layout size %@ doesn't match bounds size.", NSStringFromCGSize(nextLayout.layout.size));
} else {
as_log_verbose(ASLayoutLog(), "Using pending layout %@.", nextLayout->layout);
as_log_verbose(ASLayoutLog(), "Using pending layout %@.", nextLayout.layout);
pendingLayoutApplicable = YES;
}
@ -405,7 +405,7 @@ ASLayoutElementStyleExtensibilityForwarding
}
// Prepare to transition to nextLayout
ASDisplayNodeAssertNotNil(nextLayout.layout, @"nextLayout->layout should not be nil! %@", self);
ASDisplayNodeAssertNotNil(nextLayout.layout, @"nextLayout.layout should not be nil! %@", self);
_pendingLayoutTransition = [[ASLayoutTransition alloc] initWithNode:self
pendingLayout:nextLayout
previousLayout:_calculatedDisplayNodeLayout];