3 ms·
Well how else are you supposed to nest your preprocessor macros? :P Thanks though! I like taking the time to make my code as clean as I can. Glad others apprec
by zwegner 7y ago
Well how else are you supposed to nest your preprocessor macros? :P
Thanks though! I like taking the time to make my code as clean as I can. Glad others appreciate it!
- usr1106 7y agoI have used the same "indendation" in the past. Because there are always review comments that his would be weird/confusing/unconventional I have given up on using it :(
- kevin_thibedeau 7y agoIt used to be the only valid way to indent macros. It has the advantage that macro lines always get highlighted in column-1 and stand out more from regular structured code.
- brandmeyer 7y agoHonestly? Give clang-format a try. There's tons of options available. Futz with them until you get a set that is to your liking, and then write them down in your repo's `.clang-format` file. After that, the answer to "does this pull request comply with my formatting guidelines?" gets reduced to "does clang-format change this file?"
- leetcrew 7y agoI think it's more common to put the indentation before the '#'. either way it ends up looking a little weird, but I prefer to see some visual indication of nesting.
- speps 7y agoThe # doesn't need to be first on the line, looks better in my opinion.