Skip to content

bugfix: remove references to results of calculations and function returns

Sergey Gorbunov requested to merge se.gorbunov/cbmroot:fixConst into master

Fix several bugs like this:

const fvec &dzli = 1. / (zl - targZ);

here dzli is a reference to a temporary calculation result. The code has potentially unpredicted behavior because it is not clear how long the calculation result will be kept in a temporary place.

And anyhow the code has no advantages over the conventional code:

const fvec dzli = 1. / (zl - targZ);

Merge request reports