A question regarding code style #2446
DanielMowitz
started this conversation in
General
Replies: 1 comment
-
|
Hi @DanielMowitz, I did not author the guidelines, but I understand them, they are talking more about formatting than usage of |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Browsing the code, I noticed that the pattern
Context::getContextis used very often (917 times according to a quick grep). Many times the context getter is called just to retrieve one value, which happens multiple times per method. This could be shortened by instead usingauto& context = Context::getContext ();once and then just usingcontext.I am aware that the coding style page states:
Yet I'd like to ask the imaginary single maintainer to overthink their coding style a little ;)
If this is wanted I'd be more than happy to go through the source and apply this change everywhere.
Beta Was this translation helpful? Give feedback.
All reactions