History

Merge pull request #935 from HifiExperiments/jointName

conversionPenaltyScore should accumulate

HifiExperiments committed 2 years ago

Commit 376cd072 parents b22f5fe 426df9d1 file · +1 −1Browse files

Showing the changes to libraries/script-engine/src/v8/ScriptObjectV8Proxy.cpp (1 of 1 file). Show all

Unified · Split

libraries/script-engine/src/v8/ScriptObjectV8Proxy.cpp+1−1
@@ -1040,7 +1040,7 @@ void ScriptMethodV8Proxy::call(const v8::FunctionCallbackInfo<v8::Value>& argume · 1039 unmodified lines
10401040 } else {
10411041 qVarArgLists[i].append(varArgVal);
10421042 const QVariant& converted = qVarArgLists[i].back();
1043− conversionPenaltyScore = _engine->computeCastPenalty(V8ScriptValue(_engine, argVal), methodArgTypeId);
1043+ conversionPenaltyScore += _engine->computeCastPenalty(V8ScriptValue(_engine, argVal), methodArgTypeId);
10441044
10451045 // a lot of type conversion assistance thanks to https://stackoverflow.com/questions/28457819/qt-invoke-method-with-qvariant
10461046 // A const_cast is needed because calling data() would detach the QVariant.