-
Notifications
You must be signed in to change notification settings - Fork 100
Small code quality fixups #2164
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
Conversation
Weird. I ran astyle locally and it didn't do that. OK, will reformat again... |
I’m having second thoughts about the line break between function definition and the opening brace. I can try tweaking the rules tonight and see if we can consistently get the brace on the same line instead for all types of blocks. |
I personally do prefer it - I thought 1tbs was meant to have the brace on the opening line, like all the other multi-line blocks. |
d2ceafb
to
a88bd8c
Compare
The astyle interpretation of 1tbs is as follows, quoting the relevant passage:
https://astyle.sourceforge.net/astyle.html#_style=1tbs The reason I feel iffy about this rule on second thought, is the apparent inconsistency. There is surely an underlying logic, but it's not obvious at a glance. |
While I appreciate the extra contextual information about the problem space which is communicated by the macro name, it's still permanently set, so the macro and its ifdefs are redundant. The command line options it gates are already documented as fixtures in the man page.
a88bd8c
to
08128dd
Compare
Well, I obviously misremembered what brace styles were called then, which isn't that surprising... sigh. Anyway, here it is formatted according to the current rules, since we may as well be consistent |
Just a couple of small fixups not really connected to anything else but which were trivial to fix while I was passing
#define FUCKED
gave me a real surge of empathy for whoever wrote that code, it is in fact redundant, since it looks like it's been permanently defined for the last 25 years; I think we can get rid of the ifdefs now.