-
-
Notifications
You must be signed in to change notification settings - Fork 33
Update clang-format rules #126
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
|
I'm waiting for #125 on this one, in case that needs reformatting. |
3c0b06c to
44ef5ff
Compare
| if (unlikely(member_info.is_initial_def())) { | ||
| // another parent defines this type, | ||
| // which is disallowed! | ||
| // which is disallowed! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should remain one-tab indented, just like the line before.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested why this is happening and it looks like this is the trade-off of turning ReflowComments on. The multi-line block comments are formatted correctly now (with tabs), but multiple single-line comments get converted to spaces for whatever reason.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh dear. that surely seems like a bug then. so far i couldn't find an upstream report about this...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seems like a bad interaction of ReflowComments and UseTabs...
| } | ||
| // else that member knows the type, | ||
| // but we're looking for the initial definition. | ||
| // but we're looking for the initial definition. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here
| target_obj->apply( | ||
| // TODO: use the same mechanism as above to get only parent | ||
| // obj states of base_state | ||
| // obj states of base_state |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same, should remain the tab.
nyan/value/number.cpp
Outdated
|
|
||
| // explicit instantiations | ||
| template class Number<value_int_t>; // Int | ||
| template class Number<value_int_t>; // Int |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here, comment lineup is likely bad
nyan/value/number.h
Outdated
| INF_POS, //!< set this to positive infinite | ||
| INF_NEG, //!< set this to negative infinite | ||
| ZERO, //!< set this to zero | ||
| ZERO, //!< set this to zero |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here
3011ade to
40f41fb
Compare
40f41fb to
3e4fb5a
Compare
|
I fixed everything I could. About the spaces in the indentation of the comments: Let's accept that these exist because |
|
Great, thanks! |
Updates the clang format rules to a newer clang-format version. I also tried to sync the rules with the openage formatting (see here).