Skip to content
Snippets Groups Projects

bugfix: remove references to results of calculations and function returns

Merged 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

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
Please register or sign in to reply
Loading