Skip to content

Commit

Permalink
Merge pull request #46 from sibljon/fix-warning-when-asserts-disabled
Browse files Browse the repository at this point in the history
Reduce warning when "foundation assertions" disabled
  • Loading branch information
cloudkite committed Feb 1, 2014
2 parents 74aacec + fd5a65c commit a3028b4
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions Masonry/MASViewConstraint.m
Original file line number Diff line number Diff line change
Expand Up @@ -191,8 +191,7 @@ - (void)setSecondViewAttribute:(id)secondViewAttribute {
[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;
Expand Down

0 comments on commit a3028b4

Please sign in to comment.