-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Indentation of public, protected, private keywords #4448
Comments
Also Xcode makes it easy to make this change if this is the path we go down. Easy to Xcode Default indentation :) |
yeah +1 |
dudes.... get to know your tools. here's PR: #4453 Created with
You might want to take this opportunity to have your tiresome discussion about where braces need to be placed, etc. however I think there are more pressing issues at hand ;) |
dude, get to know your tools: https://github.com/openframeworks/openFrameworks/wiki/openFrameworks-Coding-style-guidelines and the /scripts/dev/style directory. |
Ah nice so there is stuff available regarding this. Well don't have an overview about all the details of the project yet, scusi :/ Was just irritated that copy/paste is used for reformatting of sourcecode. And yeah maybe I should step back here a little bit, thanks for pointing that out. Anyways I have seen that there is no consistently applied style right now by looking at the different headers, so I think having this automated solution which will indent the complete source tree for once would be nice. (wtf happened with that const keyword? looking into it...) |
If you look at /scripts/dev/style, you will find that an automated solution (using see also issue #3392 and probably some threads on the mailing list (if you want earlier history). |
Yeah it really would break a lot of old PR's that are yet to be looked at. |
I am suggesting a little change to the coding style used for oF.
I would like to remove the indentation of public, protected and private keywords.
Here is the snippet from the style guidelines I am referring to:
The
public
,protected
, andprivate
keywords should be indented inside the class with the function declarations indented as well.Every time a new line is added in a header file, it gets indented according to the IDE's (in my case Xcode) default style. And one has to manually indent the line.
I guess most people using Xcode as their IDE (I haven't checked the latest survey) and the default Xcode style is the default for other IDEs too, as Arturo says in (openframeworks/projectGenerator#59). I can confirm Qt Creator uses the same styling.
In my opinion this often leads to bad formatted code.
Another point I would like to change is the order of the following two lines in the ofApp template. They should be swapped to be in the same order as in the implementation file.
What were the reasons for the indentation? And what are the disadvantages of changing the style guidelines?
The text was updated successfully, but these errors were encountered: