Skip to content

Commit

Permalink
Fixes NSInteger warnings in RFQuiltLayout
Browse files Browse the repository at this point in the history
  • Loading branch information
Goles committed Nov 26, 2013
1 parent a1070d8 commit bdc293f
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions RFQuiltLayout/RFQuiltLayout.m
Expand Up @@ -170,11 +170,11 @@ - (void) fillInBlocksToUnrestrictedRow:(int)endRow {
// a vertical layout, then when we assign positions to
// the items we'll invert the axis

int numSections = [self.collectionView numberOfSections];
for (int section=self.lastIndexPathPlaced.section; section<numSections; section++) {
int numRows = [self.collectionView numberOfItemsInSection:section];
NSInteger numSections = [self.collectionView numberOfSections];
for (NSInteger section=self.lastIndexPathPlaced.section; section<numSections; section++) {
NSInteger numRows = [self.collectionView numberOfItemsInSection:section];

for (int row=(!self.lastIndexPathPlaced? 0 : self.lastIndexPathPlaced.row+1); row<numRows; row++) {
for (NSInteger row = (!self.lastIndexPathPlaced? 0 : self.lastIndexPathPlaced.row + 1); row<numRows; row++) {
NSIndexPath* indexPath = [NSIndexPath indexPathForRow:row inSection:section];

if([self placeBlockAtIndex:indexPath]) {
Expand All @@ -194,11 +194,11 @@ - (void) fillInBlocksToIndexPath:(NSIndexPath*)path {
// a vertical layout, then when we assign positions to
// the items we'll invert the axis

int numSections = [self.collectionView numberOfSections];
for (int section=self.lastIndexPathPlaced.section; section<numSections; section++) {
int numRows = [self.collectionView numberOfItemsInSection:section];
NSInteger numSections = [self.collectionView numberOfSections];
for (NSInteger section=self.lastIndexPathPlaced.section; section<numSections; section++) {
NSInteger numRows = [self.collectionView numberOfItemsInSection:section];

for (int row=(!self.lastIndexPathPlaced? 0 : self.lastIndexPathPlaced.row+1); row<numRows; row++) {
for (NSInteger row=(!self.lastIndexPathPlaced? 0 : self.lastIndexPathPlaced.row+1); row<numRows; row++) {

// exit when we are past the desired row
if(section >= path.section && row > path.row) { return; }
Expand Down

0 comments on commit bdc293f

Please sign in to comment.