Skip to content

Commit

Permalink
Fixed: Static analyzer warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
shpakovski committed May 25, 2011
1 parent dd0cc3a commit 79d115f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions Classes/AQGridView.m
Expand Up @@ -598,7 +598,7 @@ - (void) reloadData
self.contentSize = [_gridData sizeForEntireGrid];

// fix up the visible index list
NSUInteger cutoff = MAX(0, _gridData.numberOfItems-_visibleIndices.length);
NSUInteger cutoff = MAX((NSUInteger)0, _gridData.numberOfItems - _visibleIndices.length);
_visibleIndices.location = MIN(_visibleIndices.location, cutoff);
_visibleIndices.length = 0;

Expand Down Expand Up @@ -935,7 +935,7 @@ - (void) endUpdates

- (void) _updateItemsAtIndices: (NSIndexSet *) indices updateAction: (AQGridViewUpdateAction) action withAnimation: (AQGridViewItemAnimation) animation
{
BOOL needsAnimationSetup = ([_updateInfoStack count] <= _animationCount);
BOOL needsAnimationSetup = ((NSInteger)[_updateInfoStack count] <= _animationCount);

// not in the middle of an update loop -- start animations here
if ( needsAnimationSetup )
Expand Down Expand Up @@ -965,7 +965,7 @@ - (void) reloadItemsAtIndices: (NSIndexSet *) indices withAnimation: (AQGridView

- (void) moveItemAtIndex: (NSUInteger) index toIndex: (NSUInteger) newIndex withAnimation: (AQGridViewItemAnimation) animation
{
BOOL needsAnimationSetup = ([_updateInfoStack count] <= _animationCount);
BOOL needsAnimationSetup = ((NSInteger)[_updateInfoStack count] <= _animationCount);

if ( needsAnimationSetup )
[self setupUpdateAnimations];
Expand Down
2 changes: 1 addition & 1 deletion Classes/AQGridViewUpdateItem.m
Expand Up @@ -128,7 +128,7 @@ - (NSComparisonResult) inverseCompare: (AQGridViewUpdateItem *) other
- (NSUInteger) index
{
// handle case where offset is negative and would cause index to wrap
if ( (_offset < 0) && (abs(_offset) > _index) )
if ( (_offset < 0) && (abs(_offset) > (NSInteger)_index) )
return ( 0 );

return ( _index + _offset );
Expand Down

0 comments on commit 79d115f

Please sign in to comment.