builtins.cpp: #ifdef OS_NT ... #else ... #endif part: more human-readable.#69
Conversation
grafikrobot
left a comment
There was a problem hiding this comment.
I do like indenting for scope, even the preprocessor logic. Unfortunately this style of indent means that, in the future, when/if we use something like clang-format it will reformat to put the # back at column 0. Hence I would prefer if the indent padding is after the #. Like this:
#if X
# if Y
# endif
#endif
Which is what the previous code has. It's just that it's been a really small indent, as opposed to the current preference of indenting on 4. Otherwise, the change looks fine.
|
Thank you for answer ! (-:
In https://stackoverflow.com/questions/24476165/indenting-preprocessor-directives-with-clang-format , could you please see the 2021-02-02 answer by Gabriel Staples ? Than answer has directed me here: https://releases.llvm.org/9.0.0/tools/clang/docs/ClangFormatStyleOptions.html -- where I can "Find in page" (Ctrl+F) "BeforeHash": IMO:
But I think this is highly subjective matter. :)
FWMOIW (For Whatever My Opinion Is Worth), if the only difference is four-spaces-versus-one-space, then perhaps we leave it with one-space => the output of |
If this looks good, we can do the same for the following part:
=>