Skip to content
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

fix for ofParameter<bool> single item constructor #25

Merged
merged 1 commit into from
Dec 18, 2024

Conversation

artificiel
Copy link
Contributor

prior to OF12.1 this is accepted:

ofParameter<bool> b {"bool"};

however thanks to implict conversion it means something which is not probably expected:

ofParameter<bool> b {true}; // the char* is converted to true.

openframeworks/openFrameworks#8132 introduces a template restriction preventing the mistake to occur, forcing correct use of either a bool (or numeric) type as a single argument for the bool parameters. in order to initialize with a name, 2 arguments are now required (string, bool).

@moebiussurfing moebiussurfing merged commit 91643f4 into moebiussurfing:develop Dec 18, 2024
@moebiussurfing
Copy link
Owner

Thanks @artificiel !
I was having these new ofParams errors using OF GH master, also for ofPath / filesystem / string changes from some weeks ago... So I rolled back using OF 0.12.0 release lately.

@artificiel
Copy link
Contributor Author

Ok i can report that ofxSurfingImGui compiles on the 20241218 OF-git, except

default: typeInputName = "unknown";
which needs openframeworks/openFrameworks#8235 (also due to implicit conversion tightening of ofParameter, but in this case it's the implementation that needs a tweak as the intent is clear with char * on a std::string)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants