-
Notifications
You must be signed in to change notification settings - Fork 39
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
min / max macros in opl2.h cause issues when using opl2.h with other libraries #73
Comments
In the library and examples these functions are only used to clamp values to a valid range. Using |
ok sounds good, thanks! |
Possible fix for #73 still to be tested on all platforms other than Raspberry Pi.
Please reopen if the issue persists |
Great, thanks! I'll back out my |
Filing this so I don't forget -- I'll try and send a PR with a fix soon.
I'm not a C++ expert but I did some googling after hitting some compiler errors when I tried to use
std::min
in a file that includesOPL2.h
and found that defining min/max macros is discouraged (for this reason).This workaround works:
I think probably
std::min
andstd::max
could be used instead, at least for raspberry pi. Or this macro could move to the relevant cpp files instead.The text was updated successfully, but these errors were encountered: