Jump to Content
Register
Log in
Forgot your password?
Third-party login
Handmade
Projects
Events
Jams
Conferences
Fishbowls
Podcast
Handmade Dev Show
Forums
Resources
Education
twitter
Handmade Network
»
Forums
← Back to index
grillage
2 posts
#13770
#define and typedef DIRECT_SOUND_CREATE
6 years, 4 months ago
Why is Casey using a #define for DIRECT_SOUND_CREATE? I can see that with the X_INPUT macros he is saving writing the full definitions twice. But DIRECT_SOUND_CREATE is only used once. Is the #define really necessary?
mmozeiko
Mārtiņš Možeiko
2562 posts / 2 projects
#13773
#define and typedef DIRECT_SOUND_CREATE
6 years, 4 months ago
Because he is used to declare function pointers with this kind of macro. It just a habit thing.
grillage
2 posts
#13774
#define and typedef DIRECT_SOUND_CREATE
6 years, 4 months ago
But in this case it is not necessary right?
mmozeiko
Mārtiņš Možeiko
2562 posts / 2 projects
#13778
#define and typedef DIRECT_SOUND_CREATE
6 years, 4 months ago
It is not necessary in any case. You can always type full function signature in all the places where its needed. And it will work fine.
← Back to index
Log in
to reply