Skip to content

Commit

Permalink
Fix warnings, update podspec
Browse files Browse the repository at this point in the history
  • Loading branch information
marcoarment committed Apr 24, 2014
1 parent 756462a commit 1be9547
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
1 change: 0 additions & 1 deletion CompactConstraint.podspec
Expand Up @@ -9,5 +9,4 @@ Pod::Spec.new do |s|
s.source_files = 'CompactConstraint/*.{h,m}'
s.requires_arc = true
s.ios.deployment_target = '6.0'
s.osx.deployment_target = '10.7'
end
8 changes: 6 additions & 2 deletions CompactConstraint/NSLayoutConstraint+CompactConstraint.m
Expand Up @@ -7,8 +7,6 @@

@implementation NSLayoutConstraint (CompactConstraint)



+ (NSArray *)compactConstraints:(NSArray *)relationshipStrings metrics:(NSDictionary *)metrics views:(NSDictionary *)views
{
return [self compactConstraints:relationshipStrings metrics:metrics views:views self:nil];
Expand All @@ -28,6 +26,10 @@ + (instancetype)compactConstraint:(NSString *)relationship metrics:(NSDictionary
return [self compactConstraint:relationship metrics:metrics views:views self:nil];
}

// For release builds, where the asserted variables (leftOperandScanned, etc.) aren't used because the assertions are removed
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunused-variable"

+ (instancetype)compactConstraint:(NSString *)relationship metrics:(NSDictionary *)metrics views:(NSDictionary *)views self:(id)selfView
{
static NSCharacterSet *operatorCharacterSet = nil;
Expand Down Expand Up @@ -175,4 +177,6 @@ + (instancetype)compactConstraint:(NSString *)relationship metrics:(NSDictionary
return [NSLayoutConstraint constraintWithItem:leftOperand attribute:leftAttribute relatedBy:relation toItem:rightOperand attribute:rightAttribute multiplier:rightScalar constant:rightConstant];
}

#pragma clang diagnostic pop

@end

0 comments on commit 1be9547

Please sign in to comment.