Browse Source

use Objective-C 2.0 subscripting for dictionaries

Dan Loewenherz 9 years ago
parent
commit
20d37737c6
1 changed files with 4 additions and 4 deletions
  1. 4 4
      Masonry/NSLayoutConstraint+MASDebugAdditions.m

+ 4 - 4
Masonry/NSLayoutConstraint+MASDebugAdditions.m

@@ -106,16 +106,16 @@
 
     [description appendFormat:@" %@", [self.class descriptionForObject:self.firstItem]];
     if (self.firstAttribute != NSLayoutAttributeNotAnAttribute) {
-        [description appendFormat:@".%@", [self.class.layoutAttributeDescriptionsByValue objectForKey:@(self.firstAttribute)]];
+        [description appendFormat:@".%@", self.class.layoutAttributeDescriptionsByValue[@(self.firstAttribute)]];
     }
 
-    [description appendFormat:@" %@", [self.class.layoutRelationDescriptionsByValue objectForKey:@(self.relation)]];
+    [description appendFormat:@" %@", self.class.layoutRelationDescriptionsByValue[@(self.relation)]];
 
     if (self.secondItem) {
         [description appendFormat:@" %@", [self.class descriptionForObject:self.secondItem]];
     }
     if (self.secondAttribute != NSLayoutAttributeNotAnAttribute) {
-        [description appendFormat:@".%@", [self.class.layoutAttributeDescriptionsByValue objectForKey:@(self.secondAttribute)]];
+        [description appendFormat:@".%@", self.class.layoutAttributeDescriptionsByValue[@(self.secondAttribute)]];
     }
     
     if (self.multiplier != 1) {
@@ -131,7 +131,7 @@
     }
 
     if (self.priority != MASLayoutPriorityRequired) {
-        [description appendFormat:@" ^%@", [self.class.layoutPriorityDescriptionsByValue objectForKey:@(self.priority)] ?: [NSNumber numberWithDouble:self.priority]];
+        [description appendFormat:@" ^%@", self.class.layoutPriorityDescriptionsByValue[@(self.priority)] ?: [NSNumber numberWithDouble:self.priority]];
     }
 
     [description appendString:@">"];