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:
|
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
|
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
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 anofParameter<float>to anofParameter<int>or viceversa.The two candidate functions are:
openFrameworks/libs/openFrameworks/types/ofParameter.h
Lines 597 to 598 in c9561a0
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
As in issue #8294 this was discovered using ofxOceanode with latest proposed 0.12.1 release changes.
Eduard