-
Notifications
You must be signed in to change notification settings - Fork 17
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
util organization #28
Comments
nah its going to be a mess if you need to do #include "util/macros.h" in every file you need macros just define them in the .h of the file you need the macro (as i think it is now). |
Allright, I'll leave it as it is now then. Regarding compile time, would it be possible to not include every lib when compiling every C file, I've noticed the compile time starting to get a bit out of hand as I've been adding widgets. It would be nice not having to include |
i think that if you only put the header of libmpd in one file it wont make much difference. i think the time we are seeing is the time the pre-processor |
Roger that, I'll leave things as they are. |
After adding macros and utility functions, I was wondering what's best practice for organizing the util directory. Some of the code rely on standard macros like MIN, MAX, and quite a lot of #defines are being added all over the place (most of it my fault, I apologize for that).
Is it good practice to have e.g. a
macros.h
anddefines.h
in the util directory that can be included inwkline.h
or something like that?Also, when adding utility functions, should each function have a separate .c/.h file if the functionality falls under the "general function" category (like the copy_prop function I added earlier today)?
The text was updated successfully, but these errors were encountered: