-
Notifications
You must be signed in to change notification settings - Fork 404
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
Why does get_extended modify val_max and val_default and stuff #4861
Comments
this in turn means get_display can't be const and so on. |
Addresses surge-synthesizer#3808 but see the problem in surge-synthesizer#4861
Because some params need to have different default and/or min/max values in extended mode only (i. e. certain params going from unipolar to bipolar etc.). Any other way to deal with this? I couldn't figure out how to have these params update in such way exactly when toggling Extended on/off, other than this (as you can see through git blame)... |
yeah the answer is to make a set_extend_range() which is non const and call it consistently and do the change there. On it. |
(the reason you want things marked const correctly is so this would fail to build when we made the change, btw; its why #3808 is important). |
get_extended was mutating the state of Parameter; rather than do that add a set_extend_range and call it consistently. Add but don't activate a mode where you can force a write to extend into a compiler error also Closes surge-synthesizer#4861 Addresses surge-synthesizer#3808
I was about to make this const and realized it isn't
Why on earth isn't it?
The text was updated successfully, but these errors were encountered: