Conversation
|
Dang it why is the boat commit there. Oh well. |
|
Ready to merge. |
Should have probably made a separate fork to prevent that. |
|
Please keep the old boat code because we try to achieve feature accuracy |
|
That boat code is from this Pr #615 its a fix I just made a new branch based of my boat fix branch on accident |
|
If you don't mind me asking why did you make the PR a draft? |
|
There are examples where |
|
Also, I think it makes sense to get rid off |
|
Alright I'll work on it. |
|
I enabled all |
- Replaced most instances of `NULL` with `nullptr`. - Replaced most `shared_ptr(new ...)` with `make_shared`. - Removed the `nullptr` macro as it was interfering with the actual nullptr keyword in some instances.
|
@void2012 You want me to work on renaming methods to match our current style? |
|
@void2012 We should probably merge this PR ASAP because in the future if I were to add more "modernization" it could break existing PRs/fixes which could lead to more friction. I have already implemented |
|
@smartcmd if you could also review this that would be helpful. |
This code was not tested and breaks in Release builds, reverting to restore functionality of the nightly. All in-game menus do not work and generating a world crashes. This reverts commit a9be52c.
|
Must be an issue with nullptr somewhere |
|
I'll take a look |

Description
This replaces all C-style casts in the codebase with their appropriate C++-style equivalent. This improves type safety.
Changes
Previous Behavior
The codebase relied on C-style cases like crazy. The C-style casts lack type safety and can performant multiple types of conversions implicitly.
Root Cause
The original code used C-style cases because they were new/didn't exist when this was written. This over time can make it harder to program especially when it in C++.
New Behavior
Most C=style casts now use their C++ equivalent.
Fix Implementation
AI Use Disclosure
No.