Macros #1841
Replies: 4 comments 1 reply
-
sounds fine |
Beta Was this translation helpful? Give feedback.
-
Looking at the code as it presents itself, I disagree with setting macros all lowercase.
This has been the norm for nearly all cpp projects I have seen. |
Beta Was this translation helpful? Give feedback.
-
A second aspect: don't touch imported 3rd party libs
They have already been touched, and I hope no error was introduced, let's keep fingers crossed. |
Beta Was this translation helpful? Give feedback.
-
Again, after this excercise today, there are really more beneficial things to do in the code than renaming macros. |
Beta Was this translation helpful? Give feedback.
-
I'm considering going through all macros used in
TeXStudio and adjusting them to all use the same style.
Please let me know if you take issue
with the following style I'm proposing:
Rewrite header guards with:
This is a more readable version compared to the
different styles used throughout texstudio, such as:
adwaitascollbarengine_h
orABOUTDIALOG_H
'Local' macros vs 'Global' macros
As macros are by default 'global', overlaps can lead to problems.
To separate the two 'types' I would like to write all 'global' ones as
Capitalized_Names
and local onescompletely_lowercase
.On that note, I would like to ensure that all local
macros are definitely
#undef
afterwards.Safe Macros
I would also like to ensure that macros use proper
argument wrapping to minimize error potentials.
becomes
Constexpr > Macros
I would like to replace macros with constexpr where
appropriate to again minimize error potential.
Beta Was this translation helpful? Give feedback.
All reactions