diff --git a/AsyncDisplayKit/Details/ASEnvironment.h b/AsyncDisplayKit/Details/ASEnvironment.h index 20837d4a..6a42f18c 100644 --- a/AsyncDisplayKit/Details/ASEnvironment.h +++ b/AsyncDisplayKit/Details/ASEnvironment.h @@ -46,7 +46,7 @@ typedef struct ASEnvironmentLayoutOptionsState { ASRelativeSizeRange sizeRange;// = ASRelativeSizeRangeMake(ASRelativeSizeMakeWithCGSize(CGSizeZero), ASRelativeSizeMakeWithCGSize(CGSizeZero));; CGPoint layoutPosition;// = CGPointZero; - ASEnvironmentStateExtensions _extensions; + struct ASEnvironmentStateExtensions _extensions; } ASEnvironmentLayoutOptionsState; diff --git a/AsyncDisplayKit/Private/ASEnvironmentInternal.mm b/AsyncDisplayKit/Private/ASEnvironmentInternal.mm index 7685203e..b49fbd0e 100644 --- a/AsyncDisplayKit/Private/ASEnvironmentInternal.mm +++ b/AsyncDisplayKit/Private/ASEnvironmentInternal.mm @@ -52,9 +52,9 @@ void _ASEnvironmentLayoutOptionsExtensionSetBoolAtIndex(id object { NSCAssert(idx < kMaxEnvironmentStateBoolExtensions, @"Setting index outside of max bool extensions space"); - ASEnvironmentStateExtensions extension = object.environmentState.layoutOptionsState._extensions; - extension.boolExtensions[idx] = value; - object.environmentState.layoutOptionsState._extensions = extension; + ASEnvironmentState state = object.environmentState; + state.layoutOptionsState._extensions.boolExtensions[idx] = value; + object.environmentState = state; } BOOL _ASEnvironmentLayoutOptionsExtensionGetBoolAtIndex(id object, int idx) @@ -67,9 +67,9 @@ void _ASEnvironmentLayoutOptionsExtensionSetIntegerAtIndex(id obj { NSCAssert(idx < kMaxEnvironmentStateIntegerExtensions, @"Setting index outside of max integer extensions space"); - ASEnvironmentStateExtensions extension = object.environmentState.layoutOptionsState._extensions; - extension.integerExtensions[idx] = value; - object.environmentState.layoutOptionsState._extensions = extension; + ASEnvironmentState state = object.environmentState; + state.layoutOptionsState._extensions.integerExtensions[idx] = value; + object.environmentState = state; } NSInteger _ASEnvironmentLayoutOptionsExtensionGetIntegerAtIndex(id object, int idx) @@ -82,9 +82,9 @@ void _ASEnvironmentLayoutOptionsExtensionSetEdgeInsetsAtIndex(id { NSCAssert(idx < kMaxEnvironmentStateEdgeInsetExtensions, @"Setting index outside of max edge insets extensions space"); - ASEnvironmentStateExtensions extension = object.environmentState.layoutOptionsState._extensions; - extension.edgeInsetsExtensions[idx] = value; - object.environmentState.layoutOptionsState._extensions = extension; + ASEnvironmentState state = object.environmentState; + state.layoutOptionsState._extensions.edgeInsetsExtensions[idx] = value; + object.environmentState = state; } UIEdgeInsets _ASEnvironmentLayoutOptionsExtensionGetEdgeInsetsAtIndex(id object, int idx)