Closed LSchwiebert closed 2 years ago
Could you move the return statement from line 439 returnVal = false; to line 459 and line 486 returnVal = false; to line 512
This way if TotalBonded or TotalElec don't match the components are printed before returning false.
I changed the code but this isn't an early return from the function. It is just setting the return value, not returning from the function. However, I think it is more clear to set the return value at the end of the nested if statement.
I changed the code but this isn't an early return from the function. It is just setting the return value, not returning from the function. However, I think it is more clear to set the return value at the end of the nested if statement.
My mistake. Approved.
The ComparePotentials function had incorrect logic for checking the energies. And it was not returning a value when the potentials matched. I made three changes to the code. This should be checked carefully to ensure the logic is now correct. The changes are.
Note that I don't think this caused any incorrect output, because it doesn't look like this function is actually used in the code. But it should be fixed in any case, as it may be used in the future.