Browse Source

Merge pull request #46 from sibljon/fix-warning-when-asserts-disabled

Reduce warning when "foundation assertions" disabled
Jonas Budelmann 11 years ago
parent
commit
a3028b480b
1 changed files with 1 additions and 2 deletions
  1. 1 2
      Masonry/MASViewConstraint.m

+ 1 - 2
Masonry/MASViewConstraint.m

@@ -191,8 +191,7 @@
             [self.delegate constraint:self shouldBeReplacedWithConstraint:compositeConstraint];
             return compositeConstraint;
         } else {
-            BOOL layoutConstantUpdate = self.layoutRelation == relation && [attribute isKindOfClass:NSNumber.class];
-            NSAssert(!self.hasLayoutRelation || layoutConstantUpdate, @"Redefinition of constraint relation");
+            NSAssert(!self.hasLayoutRelation || self.layoutRelation == relation && [attribute isKindOfClass:NSNumber.class], @"Redefinition of constraint relation");
             self.layoutRelation = relation;
             self.secondViewAttribute = attribute;
             return self;