| 4088 | } |
| 4089 | |
| 4090 | bool |
| 4091 | KnobHelper::cloneExpressionsAndCheckIfChanged(KnobI* other, |
| 4092 | int dimension, |
| 4093 | int otherDimension) |
| 4094 | { |
| 4095 | assert( (int)_imp->expressions.size() == getDimension() ); |
| 4096 | assert( (dimension == otherDimension) || (dimension != -1) ); |
| 4097 | assert(other); |
| 4098 | bool ret = false; |
| 4099 | try { |
| 4100 | int dims = std::min( getDimension(), other->getDimension() ); |
| 4101 | for (int i = 0; i < dims; ++i) { |
| 4102 | if ( (i == dimension) || (dimension == -1) ) { |
| 4103 | std::string expr = other->getExpression(i); |
| 4104 | bool hasRet = other->isExpressionUsingRetVariable(i); |
| 4105 | if ( !expr.empty() && ( (expr != _imp->expressions[i].originalExpression) || (hasRet != _imp->expressions[i].hasRet) ) ) { |
| 4106 | setExpression(i, expr, hasRet, false); |
| 4107 | cloneExpressionsResults(other, i, otherDimension); |
| 4108 | ret = true; |
| 4109 | } |
| 4110 | } |
| 4111 | } |
| 4112 | } catch (...) { |
| 4113 | ///ignore errors |
| 4114 | } |
| 4115 | |
| 4116 | return ret; |
| 4117 | } |
| 4118 | |
| 4119 | void |
| 4120 | KnobHelper::cloneOneCurve(KnobI* other, |
nothing calls this directly
no test coverage detected