-
-
Notifications
You must be signed in to change notification settings - Fork 234
engine's headers review #540
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
Conversation
removed unnecessary declarations in engine headers results in 9% decreasing of compilation time and roughly 17% decreasing of dependencies among sources
removed unnecessary declarations in engine headers results in 9% decreasing of compilation time and roughly 17% decreasing of dependencies among sources
removed unnecessary declarations in engine headers results in 9% decreasing of compilation time and roughly 17% decreasing of dependencies among sources, all forward declarations are collected in jam_fwd.h
grafikrobot
left a comment
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.
Looks really good except for two things:
- I prefer moving to
using. Eventually I want to rework all the typedefs accrodingly. But one small step at a time. - You need to undo the jamgram.* changes. Or upgrade to a newer Bison version (preferably the same one I use -- 3.8.2).
Thanks for doing all this cleanup!
| */ | ||
|
|
||
| // frames.h | ||
| typedef struct frame FRAME; |
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.
If possible do using A = B;. In this case do:
struct frame;
using FRAME = frame;
Same applies for the other typedef's here.
| #include "value.h" | ||
|
|
||
| using OBJECT = b2::value; | ||
| typedef b2::value OBJECT; |
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.
Please keep the using.
|
I didn't make the changes to jamgram, and to be honest, I'm quite annoyed by these unwanted changes, forced pushes, conflicts, and other merges. I've never had all these problems. Every time I did a pull, I found the topic branch polluted with commits that had nothing to do with this work, which forced me to resolve conflicts or, even worse, to have to double-check each modified file one at a time... This way of working is profoundly disrespectful of the work of others. If I create a topic branch, I obviously want to isolate some changes from everything else. |
removed unnecessary declarations in engine headers results in 9% decreasing of compilation time and
roughly 17% decreasing of dependencies among sources.
All forward declarations are collected in
jam_fwd.hheader file.Now you can think about cleaning up the individual sources from all unnecessary includes, and this should also bring several benefits.
Note
Replaces #532