iOS7Colors icon indicating copy to clipboard operation
iOS7Colors copied to clipboard

Is there a reason for the semicolons before all the method bodies?

Open HiddenJester opened this issue 11 years ago • 1 comments

For example: + (instancetype)iOS7redColor; { return [UIColor colorWithRed:1.0f green:0.22f blue:0.22f alpha:1.0f]; }

I'm using https://github.com/boredzo/Warnings-xcconfig in my project as well and there is a warning -Wno-semicolon-before-method-body which is turned on and that promotes up to an error. I get that they are essentially harmless but I don't think they are doing anything either. (I don't use CocoaPods, so it might be important there?)

I pulled the semicolons out on my local copy and everything seems fine. I can send you a Pull request with the change if you would like but I figured I'd ask before just sending it out of the iOS7lightBlueColor 😃

HiddenJester avatar Mar 28 '14 23:03 HiddenJester

(sigh) and the instant I hit Post it occurred to me that a closed issue might have addressed this already. So I guess consider this a second vote against the semicolons. Makes copy/paste between .h & .m easier but also triggers an optional warning.

HiddenJester avatar Mar 28 '14 23:03 HiddenJester