浏览代码

Merge pull request #86 from realestate-com-au/master

Minor fixes for stricter compiler warnings
Jonas Budelmann 11 年之前
父节点
当前提交
9ab610a083
共有 2 个文件被更改,包括 3 次插入2 次删除
  1. 2 1
      Masonry/MASCompositeConstraint.m
  2. 1 1
      Masonry/MASUtilities.h

+ 2 - 1
Masonry/MASCompositeConstraint.m

@@ -39,7 +39,8 @@
 }
 
 - (MASConstraint *)constraint:(MASConstraint __unused *)constraint addConstraintWithLayoutAttribute:(NSLayoutAttribute)layoutAttribute {
-    MASConstraint *newConstraint = [self.delegate constraint:self addConstraintWithLayoutAttribute:layoutAttribute];
+    id<MASConstraintDelegate> strongDelegate = self.delegate;
+    MASConstraint *newConstraint = [strongDelegate constraint:self addConstraintWithLayoutAttribute:layoutAttribute];
     newConstraint.delegate = self;
     [self.childConstraints addObject:newConstraint];
     return newConstraint;

+ 1 - 1
Masonry/MASUtilities.h

@@ -112,7 +112,7 @@ static inline id _MASBoxValue(const char *type, ...) {
         unsigned char actual = (unsigned char)va_arg(v, unsigned int);
         obj = [NSNumber numberWithUnsignedChar:actual];
     } else if (strcmp(type, @encode(unsigned int)) == 0) {
-        unsigned int actual = (int)va_arg(v, unsigned int);
+        unsigned int actual = (unsigned int)va_arg(v, unsigned int);
         obj = [NSNumber numberWithUnsignedInt:actual];
     } else if (strcmp(type, @encode(unsigned long)) == 0) {
         unsigned long actual = (unsigned long)va_arg(v, unsigned long);