[Infer] Fix Infer errors/warnings (#1938)

* [Infer] Fix 11 Infer errors/warnings

* fix build error
This commit is contained in:
Hannah Troisi
2016-07-16 15:29:24 -07:00
committed by appleguy
parent abf8d5b9aa
commit 4baf9bdbfe
10 changed files with 54 additions and 24 deletions

View File

@@ -606,16 +606,18 @@ static NSString * const kCellReuseIdentifier = @"_ASTableViewCell";
cell.delegate = self;
ASCellNode *node = [_dataController nodeAtIndexPath:indexPath];
[_rangeController configureContentView:cell.contentView forCellNode:node];
if (node) {
[_rangeController configureContentView:cell.contentView forCellNode:node];
cell.node = node;
cell.backgroundColor = node.backgroundColor;
cell.selectionStyle = node.selectionStyle;
cell.node = node;
cell.backgroundColor = node.backgroundColor;
cell.selectionStyle = node.selectionStyle;
// the following ensures that we clip the entire cell to it's bounds if node.clipsToBounds is set (the default)
// This is actually a workaround for a bug we are seeing in some rare cases (selected background view
// overlaps other cells if size of ASCellNode has changed.)
cell.clipsToBounds = node.clipsToBounds;
// the following ensures that we clip the entire cell to it's bounds if node.clipsToBounds is set (the default)
// This is actually a workaround for a bug we are seeing in some rare cases (selected background view
// overlaps other cells if size of ASCellNode has changed.)
cell.clipsToBounds = node.clipsToBounds;
}
return cell;
}