Beginners' questions: Understanding OpenMW/OpenCS code

Everything about development and the OpenMW source code.
User avatar
AnyOldName3
Posts: 946
Joined: 26 Nov 2015, 03:25

Re: Beginners' questions: Understanding OpenMW/OpenCS code

Post by AnyOldName3 » 07 Jul 2018, 11:55

If I'm using something a bazillion times in the same function, I'll consider a typedef, but usually it's not necessary.
AnyOldName3, Master of Shadows

User avatar
Zini
Posts: 5401
Joined: 06 Aug 2011, 15:16

Re: Beginners' questions: Understanding OpenMW/OpenCS code

Post by Zini » 08 Jul 2018, 09:38

Fully qualified names. Period. Being able to clearly see at the first glance what you are dealing with is more important than brevity (at least in C++).

btw. we probably should remove the section about using declarations at some point. That was a nod towards people who preferred this feature, done at a time when the source code was less mature. But since basically nobody makes use of it in OpenMW, there is little point in keeping this section of the style guide around.

Regarding authors recommending shortening code in any way possible: Well, there is a lot of bad advice around C++ on the internet.

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests