-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Closed
Description
Hi!
While testing for the 0.12.1 release, I found a regression in ofParameter.
To reproduce the issue just assign two convertible ofParameters, for example an ofParameter<float> to an ofParameter<int> or viceversa.
ofParameter<float> pFloat = 3.3;
ofParameter<int> pInt = 3;
pFloat = pInt;The two candidate functions are:
openFrameworks/libs/openFrameworks/types/ofParameter.h
Lines 597 to 598 in c9561a0
| ofParameter<ParameterType> & operator=(const ofParameter<ParameterType> & v); | |
| const ParameterType & operator=(const ParameterType & v); |
My suspicion is that this bug was introduced with this new ctor in commit 5f8dfc4
openFrameworks/libs/openFrameworks/types/ofParameter.h
Lines 522 to 527 in c9561a0
| template < | |
| typename Arg, | |
| typename = std::enable_if_t<(!(std::is_convertible_v<Arg, std::string> and std::is_same_v<ParameterType, std::string>) and | |
| std::is_convertible_v<Arg, ParameterType> and | |
| !((std::is_same_v<ParameterType, bool>)and!(std::is_arithmetic_v<Arg>)))>> | |
| ofParameter(const Arg & v); |
As in issue #8294 this was discovered using ofxOceanode with latest proposed 0.12.1 release changes.
Eduard
Metadata
Metadata
Assignees
Labels
No labels