-
Notifications
You must be signed in to change notification settings - Fork 8
Refactoring random stuff #32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
I need a code lawyer...
|
This broke some tests (I didn't review the code yet) : at least the quaternion math is broken. |
|
Doesn't compile on linux (circleci build fails): (and so on, I didn't copy paste everything) Also there is a warning (which I assume means you haven't ran clang format on the files you have edited): |
|
\o/ |
|
I have now reviewed the actual code and first of there are some good changes that I would merge if they were in a separate commit (so I could cherry-pick it): these are the removal of the maths files that never got written. Then there are some good ideas like the usage of std::optional and making warn once thread safe, unfortunately these are implemented in a way that I don't like them. There should be no calls to .has_value() and the StringIterator debugging is most likely broken due to the change. And the extra class of having a Monitor is not good. Everything that is thread safe should inherit from ThreadSafe and use GUARD_LOCK();. Then there are the vector types, which I think have been split into too many files and even with splitting Types.h into 3 files is in my opinion quite unnecessary. Also the fact that the implementations of the functions for these classes are outside the class is not consistent with the style I want to go for. And I also think that the nan check debugging help is broken here as well. |
Engine/Common/CommonMath.h
Outdated
| DLLEXPORT bool IsEqual(float x, float y) noexcept; | ||
|
|
||
| }} // namespace Leviathan::MMath | ||
| constexpr double FLOATING_POINT_COMPARISON_EPSILON = 1e-5; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why duplicate EPSILON here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was a magic number before that i made into a constant, i guess there is another constant for that? No idea if those functions are actually used anywhere to begin with tho, they're definetely not used in the vector code, and if they are they should probably be rewritten to be inlined (and check if the abs call is inlined as well)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The math code was written when I was writing a model importer, it was abandoned when I switched to Ogre. But the math code should be kept.
There are a bunch of constants in Define.h including Leviathan::EPSILON
…rn/websocket-extensions-0.1.4 Bump websocket-extensions from 0.1.3 to 0.1.4
What it says in the tin, refactorng random crap to learn the engine internals while doing something marginally useful.