From 60f5ba2d1781815236b5f2a695ddca9979c99ff7 Mon Sep 17 00:00:00 2001 From: Adlai Holler Date: Thu, 25 Feb 2016 10:40:38 -0800 Subject: [PATCH] Simplify ASMapNode.setAnnotations --- AsyncDisplayKit/ASMapNode.mm | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/AsyncDisplayKit/ASMapNode.mm b/AsyncDisplayKit/ASMapNode.mm index ab85e4acd3..e7ec4cab2b 100644 --- a/AsyncDisplayKit/ASMapNode.mm +++ b/AsyncDisplayKit/ASMapNode.mm @@ -260,12 +260,10 @@ - (void)setAnnotations:(NSArray *)annotations { - if (annotations == nil) { - annotations = @[]; - } + annotations = [annotations copy] ?: @[]; ASDN::MutexLocker l(_propertyLock); - _annotations = [annotations copy]; + _annotations = annotations; if (self.isLiveMap) { [_mapView removeAnnotations:_mapView.annotations]; [_mapView addAnnotations:annotations];