improved check
parent
fa33bca0c7
commit
c59f458fac
|
@ -132,8 +132,8 @@ bool NonlinearOptimizerParams::equals(const NonlinearOptimizerParams& other,
|
||||||
if (iterativeParams && other.iterativeParams) {
|
if (iterativeParams && other.iterativeParams) {
|
||||||
iterative_params_equal = iterativeParams->equals(*other.iterativeParams);
|
iterative_params_equal = iterativeParams->equals(*other.iterativeParams);
|
||||||
} else {
|
} else {
|
||||||
// If one or both shared pointers are null, we can't assume they are equal
|
// Check if either is null. If both are null, then true
|
||||||
iterative_params_equal = false;
|
iterative_params_equal = !iterativeParams && !other.iterativeParams;
|
||||||
}
|
}
|
||||||
|
|
||||||
return maxIterations == other.getMaxIterations() &&
|
return maxIterations == other.getMaxIterations() &&
|
||||||
|
|
Loading…
Reference in New Issue