Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes NSInteger warnings in RFQuiltLayout #14

Merged
merged 1 commit into from
Nov 26, 2013
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions RFQuiltLayout/RFQuiltLayout.m
Original file line number Diff line number Diff line change
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