Ticket #11164 (closed: fixed)

Opened 6 years ago

Last modified 5 years ago

Fix cppcheck Warning

Reported by: Owen Arnold Owned by: Owen Arnold
Priority: major Milestone: Release 3.4
Component: Framework Keywords:
Cc: saviciat@… Blocked By:
Blocking: Tester: Federico M Pouzols

Description

Fix cppcheck warning in WeightedMeanMD

Change History

comment:1 Changed 6 years ago by Owen Arnold

  • Status changed from new to assigned

comment:2 Changed 6 years ago by Owen Arnold

  • Status changed from assigned to inprogress

refs #11164. Remove duplicate check.

Changeset: c207c84622c64253aa7d47be7db52808fd9455a9

comment:3 Changed 6 years ago by Owen Arnold

  • Status changed from inprogress to verify
  • Resolution set to fixed

This is being verified as pull request #292.

comment:4 Changed 6 years ago by Owen Arnold

Jenkins retest this please

comment:5 Changed 6 years ago by Owen Arnold

Jenkins retest this please

comment:6 Changed 6 years ago by Owen Arnold

Tester. Look at the code change. Check unit tests are passing. That should be sufficient.

comment:7 Changed 6 years ago by Harry Jeffery

  • Status changed from verify to verifying
  • Tester set to Harry Jeffery

comment:8 Changed 6 years ago by Andrei Savici

I agree with Harry

comment:9 Changed 6 years ago by Owen Arnold

Thanks for checking. I was too hasty.

comment:10 Changed 6 years ago by Owen Arnold

refs #11164. Change branch conditions.

Changeset: 2fd1c92e8a4dffc427bfc378c4173a1f02ad6f1b

comment:11 Changed 6 years ago by Andrei Savici

By the way, I just looked into the code. The lhs error and rhs errors are always >=0. It's a square root function. So you can probably rewrite those conditions.

comment:12 Changed 6 years ago by Andrei Savici

Also, since you are using error squared, use getErrorSquared

comment:13 Changed 6 years ago by Owen Arnold

refs #11164. fix error < 0

The errors are always going to be >= 0, so no point checking if they are < 0. MDHistoWorkspaceIterator does not define getErrorSquared(), and this issue is about fixing cppcheck issues, so I'm not adding those features here.

Changeset: ca3b293d4ae7d3eece7826bf462ae57349625148

comment:14 Changed 6 years ago by Harry Jeffery

Jenkins, retest this please.

comment:15 Changed 6 years ago by Harry Jeffery

Jenkins, retest this please.

comment:16 Changed 6 years ago by Federico M Pouzols

Jenkins, retest this please.

comment:17 Changed 6 years ago by Owen Arnold

  • Status changed from verifying to verify
  • Tester Harry Jeffery deleted

comment:18 Changed 6 years ago by Harry Jeffery

Returning to testing pool as I won't be around next week, and don't have time to finish testing this today.

comment:19 Changed 6 years ago by Federico M Pouzols

Jenkins, test this please.

comment:20 Changed 6 years ago by Federico M Pouzols

  • Status changed from verify to verifying
  • Tester set to Federico M Pouzols

comment:21 Changed 6 years ago by Federico M Pouzols

Tests pass, compilers are happy and birds are singing. The if conditions look logically consistent to me.

comment:22 Changed 6 years ago by Federico M Pouzols

  • Status changed from verifying to closed

Merge pull request #292 from mantidproject/feature/11164_weightedmeanmd

Fix cppcheck Warning

Full changeset: 63912fca554d59a2b4476fd1df64990694ec9980

comment:23 Changed 5 years ago by Nick Draper

Somehow these slipped through without a resolution. Set to Fixed.

comment:24 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 12003

Note: See TracTickets for help on using tickets.