supermarin / ObjectiveSugar

ObjectiveC additions for humans. Ruby style.
MIT License
2.17k stars 190 forks source link

Replaced eachWithIndex int with NSUInteger to fix implicit conversion co... #42

Closed aptonic closed 10 years ago

aptonic commented 11 years ago

Minor fix to resolve a compiler warning. Thanks for the awesome library :)

aptonic commented 11 years ago

Just to clarify - the reason this change is needed is that eachWithIndex uses enumerateObjectsUsingBlock which expects an NSUInteger for its block index argument but an int is being passed instead resulting in a build warning.

Also: I've just fixed a failing test from an int instead of NSUInteger being passed in the eachWithIndex test. All seems well now.

supermarin commented 11 years ago

@wintersoft thanks for the PR!

I'll consider merging this, but have to note that there was a similar one before: https://github.com/mneorr/ObjectiveSugar/pull/23

Maybe @seivan should get commit credits since his PR was from way before. The thing that stopped me from merging his PR was verboseness.

aptonic commented 11 years ago

Oh cool. Sorry I didn't see the earlier work by @seivan - I'd be happy to see either of our contributions merged. His seems to cover a lot more ground. My main issue is I don't like seeing those build warnings and passing an int to enumerateObjectsUsingBlock is definitely incorrect. It seems to be the only warning in the project otherwise.

seivan commented 11 years ago

I am indifferent. Don't let me hold you back. :+1: @aptonic

aptonic commented 10 years ago

Equivalent has been merged in #23. So closing this one off now.