Whats the reasoning behind the coding style in headers? (curiousity) #1233
Mahmoud1205
started this conversation in
General
Replies: 1 comment 3 replies
-
I think you can only understand the reason if you look at it in the context of a file: The function names of all the function in a class align so that it is easier to spot them. The amount of tabs vary from file to file and is determined by the longest return type / inline specifier. In the case of DebugRenderer.h there is indeed an excessive amount of tabs, so there must have been a really long return type in the past that doesn't exist anymore. I've cleaned it up. This coding style is similar (but not exactly the same) as the coding style that is used at Guerrilla where I've worked for the past 24 years, so I just kept what I was used to. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
For example, DebugRenderer.h
I understand if it is to make each function name on the same column as other function names, but every function name is VERY far from its return type, why is that?
I'm not trying to come out as aggressive or say that this is a wrong or bad way of writing code, but I am just curious on why you write like this since maybe there's benefits to this way of writing that I don't know.
Beta Was this translation helpful? Give feedback.
All reactions