NSTimer-Blocks icon indicating copy to clipboard operation
NSTimer-Blocks copied to clipboard

Quick fixes to make this a tad nicer/safer.

Open uliwitness opened this issue 11 years ago • 2 comments

Your category name (and filename, but that I can influence by placing your file in a subfolder) is unsafe. If I add another framework that uses similar utility code, I may get a collision and not even notice it. So I've prefixed the category name. Ideally, the files would be named "NSTimer+JDBlocks.*" as well, but I presume that'd break stuff for you at this point.

I also moved the timer into a dictionary. Not strictly necessary, but provides for less surprise (all other classes restrict userInfo to dictionaries). And finally, found a trailing ';' in an implementation that I cleaned up.

All these edits were done on Github, so I hope this still compiles.

uliwitness avatar Dec 19 '13 11:12 uliwitness

Huh. Somehow it included the ARC merge I made after doing this pull request. That wasn't intended. But if you want, merge that too. I think it's nice and small.

uliwitness avatar Dec 19 '13 12:12 uliwitness

:+1: I came here to say the very same thing.

Abizern avatar Mar 19 '14 08:03 Abizern