Some questions about the state of the codebase

Everything about development and the OpenMW source code.
Post Reply
DrWhoCares
Posts: 3
Joined: 18 Oct 2023, 07:19

Some questions about the state of the codebase

Post by DrWhoCares »

I'm looking into cleaning up the code to pass the time. Probably mostly focused around optimizing build times and cleaning up minor things here and there.

1. I'm noticing that several move constructors/assignment operators are missing the noexcept keyword. Honestly probably a lot of places are. Any reason why they're absent specifically on the move constructors/operators?

2. How would you want me to handle a PR of removing a bunch of unused headers? Lotta files.

3. Any issues with PR's relating to const correctness?

4. Any issues with applying noexcept?

5. Anything I should be aware of before starting? Already read through the wiki pages on the subject.

6. Any better place to discuss things, like a discord or something that isn't a forum software from the year 2000 (even if I do like SMF)?
User avatar
akortunov
Posts: 900
Joined: 13 Mar 2017, 13:49
Location: Samara, Russian Federation

Re: Some questions about the state of the codebase

Post by akortunov »

DrWhoCares wrote: 20 Oct 2023, 06:20 1. I'm noticing that several move constructors/assignment operators are missing the noexcept keyword. Honestly probably a lot of places are. Any reason why they're absent specifically on the move constructors/operators?
...
4. Any issues with applying noexcept?
Keep in mind that OpenMW's core is written before compilers with C++11 support became widely used, so there are still many places in codebase which use a legacy code style. I suppose that "noexcept" keyword usage is one of such things.
DrWhoCares wrote: 20 Oct 2023, 06:20 2. How would you want me to handle a PR of removing a bunch of unused headers? Lotta files.
Headers which are unused with one compiler on one platform may be used on another ones due to transitive includes. It should be possible to always explicitely include all used headers, but it will only increase amount of such "unused" headers.
DrWhoCares wrote: 20 Oct 2023, 06:20 3. Any issues with PR's relating to const correctness?
Should not be any.
DrWhoCares wrote: 20 Oct 2023, 06:20 6. Any better place to discuss things, like a discord or something that isn't a forum software from the year 2000 (even if I do like SMF)?
All contacts are on the openmw.org's main page in the "Follow us" section. I'd suggest to use Discord.
User avatar
AnyOldName3
Posts: 2678
Joined: 26 Nov 2015, 03:25

Re: Some questions about the state of the codebase

Post by AnyOldName3 »

Just to reiterate, we've done a lot of unused header removal passes, including ones with automated tools that should get everything (most of which then needed undoing because they were only unused with one particular combination of compiler and STL implementation). There might still be milage in swapping big headers for smaller ones, but outright removing them isn't going to get you far.
Post Reply