Skip to content

Commit

Permalink
Fix coverity varnings (hopefully). Refs #9939
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreiSavici committed Jul 16, 2014
1 parent 206267d commit 1d227e1
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
1 change: 1 addition & 0 deletions Code/Mantid/Framework/API/src/IFunction.cpp
Expand Up @@ -53,6 +53,7 @@ namespace API
if (m_handler)
{
delete m_handler;
m_handler=NULL;
}
}

Expand Down
Expand Up @@ -58,6 +58,7 @@ namespace Mantid
CalculateGammaBackground::~CalculateGammaBackground()
{
delete m_progress;
m_indices.clear();
}

//--------------------------------------------------------------------------------------------------------
Expand Down
10 changes: 6 additions & 4 deletions Code/Mantid/Framework/CurveFitting/src/IkedaCarpenterPV.cpp
Expand Up @@ -64,10 +64,12 @@ void IkedaCarpenterPV::setHeight(const double h)
double IkedaCarpenterPV::height()const
{
// return the function value at centre()
double h0;
double toCentre = centre();
constFunction(&h0, &toCentre, 1);
return h0;
//using arrays - otherwise coverity warning
double h0[1];
double toCentre[1];
toCentre[0]= centre();
constFunction(h0, toCentre, 1);
return h0[0];
};

double IkedaCarpenterPV::fwhm()const
Expand Down

0 comments on commit 1d227e1

Please sign in to comment.