Bläddra i källkod

Merge pull request #78 from Lightricks/feature/fix-unused-variables

Add __unused for unused method parameters.
Jonas Budelmann 11 år sedan
förälder
incheckning
646226093f
3 ändrade filer med 7 tillägg och 7 borttagningar
  1. 1 1
      Masonry/MASCompositeConstraint.m
  2. 5 5
      Masonry/MASConstraint.m
  3. 1 1
      Masonry/MASViewConstraint.m

+ 1 - 1
Masonry/MASCompositeConstraint.m

@@ -38,7 +38,7 @@
     [self.childConstraints replaceObjectAtIndex:index withObject:replacementConstraint];
 }
 
-- (MASConstraint *)constraint:(MASConstraint *)constraint addConstraintWithLayoutAttribute:(NSLayoutAttribute)layoutAttribute {
+- (MASConstraint *)constraint:(MASConstraint __unused *)constraint addConstraintWithLayoutAttribute:(NSLayoutAttribute)layoutAttribute {
     MASConstraint *newConstraint = [self.delegate constraint:self addConstraintWithLayoutAttribute:layoutAttribute];
     newConstraint.delegate = self;
     [self.childConstraints addObject:newConstraint];

+ 5 - 5
Masonry/MASConstraint.m

@@ -160,7 +160,7 @@
 
 #pragma mark - Chaining
 
-- (MASConstraint *)addConstraintWithLayoutAttribute:(NSLayoutAttribute)layoutAttribute {
+- (MASConstraint *)addConstraintWithLayoutAttribute:(NSLayoutAttribute __unused)layoutAttribute {
     MASMethodNotImplemented();
 }
 
@@ -220,13 +220,13 @@
 
 - (MASConstraint * (^)(id key))key { MASMethodNotImplemented(); }
 
-- (void)setInsets:(MASEdgeInsets)insets { MASMethodNotImplemented(); }
+- (void)setInsets:(MASEdgeInsets __unused)insets { MASMethodNotImplemented(); }
 
-- (void)setSizeOffset:(CGSize)sizeOffset { MASMethodNotImplemented(); }
+- (void)setSizeOffset:(CGSize __unused)sizeOffset { MASMethodNotImplemented(); }
 
-- (void)setCenterOffset:(CGPoint)centerOffset { MASMethodNotImplemented(); }
+- (void)setCenterOffset:(CGPoint __unused)centerOffset { MASMethodNotImplemented(); }
 
-- (void)setOffset:(CGFloat)offset { MASMethodNotImplemented(); }
+- (void)setOffset:(CGFloat __unused)offset { MASMethodNotImplemented(); }
 
 #if TARGET_OS_MAC && !TARGET_OS_IPHONE
 

+ 1 - 1
Masonry/MASViewConstraint.m

@@ -65,7 +65,7 @@ static char kInstalledConstraintsKey;
 
 #pragma mark - NSCoping
 
-- (id)copyWithZone:(NSZone *)zone {
+- (id)copyWithZone:(NSZone __unused *)zone {
     MASViewConstraint *constraint = [[MASViewConstraint alloc] initWithFirstViewAttribute:self.firstViewAttribute];
     constraint.layoutConstant = self.layoutConstant;
     constraint.layoutRelation = self.layoutRelation;