Skip to content
Browse files

altered -init format to appease clang2.0. kudos @bjhomer

  • Loading branch information...
1 parent 0b5c89c commit dba0e21ac50333a4967104bdd259dc5e0b0b83d0 @davedelong committed
Showing with 10 additions and 5 deletions.
  1. +6 −3 CHLayoutConstraint.m
  2. +4 −2 CHLayoutManager.m
View
9 CHLayoutConstraint.m
@@ -45,7 +45,8 @@ + (id) transformerWithOffset:(CGFloat)anOffset scale:(CGFloat)aScale {
}
- (id) initWithOffset:(CGFloat)anOffset scale:(CGFloat)aScale {
- if (self = [super init]) {
+ self = [super init];
+ if (self) {
offset = anOffset;
scale = aScale;
}
@@ -80,7 +81,8 @@ + (id) transformerWithBlock:(CHLayoutTransformer)block {
}
- (id) initWithBlock:(CHLayoutTransformer)block {
- if (self = [super init]) {
+ self = [super init];
+ if (self) {
transformer = Block_copy(block);
}
return self;
@@ -145,7 +147,8 @@ - (id)initWithAttribute:(CHLayoutConstraintAttribute)attr relativeTo:(NSString *
return nil;
}
- if (self = [super init]) {
+ self = [super init];
+ if (self) {
attribute = attr;
sourceAttribute = srcAttr;
View
6 CHLayoutManager.m
@@ -47,7 +47,8 @@ + (id) container {
}
- (id) init {
- if (self = [super init]) {
+ self = [super init];
+ if (self) {
constraints = [[NSMutableArray alloc] init];
}
return self;
@@ -117,7 +118,8 @@ + (id) allocWithZone:(NSZone *)zone {
- (id) init {
if (!_sharedLayoutManager) {
- if (self = [super init]) {
+ self = [super init];
+ if (self) {
//initialization goes here
isProcessingChanges = NO;
viewsToProcess = [[NSMutableArray alloc] init];

0 comments on commit dba0e21

Please sign in to comment.
Something went wrong with that request. Please try again.