Skip to content

Commit

Permalink
Re #7424. Address cppcheck warnings.
Browse files Browse the repository at this point in the history
…while I'm touching the file anyway.
  • Loading branch information
RussellTaylor committed Jul 11, 2013
1 parent efea9f5 commit 2869487
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions Code/Mantid/MantidPlot/src/Mantid/MantidMatrixFunction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -174,10 +174,9 @@ size_t MantidMatrixFunction::indexX(size_t row,double s)const
if (n == 0 || s < X[0] || s > X[n-1]) return std::numeric_limits<size_t>::max();

size_t i = 0, j = n-1, k = n/2;
double ss;
for(size_t it = 0; it < n; it++)
{
ss = X[k];
const double ss = X[k];
if (ss == s ) return k;
if (abs(static_cast<int>(i) - static_cast<int>(j)) <2)
{
Expand Down Expand Up @@ -218,10 +217,9 @@ size_t MantidMatrixFunction::indexY(double s)const
}

size_t i = i0, j = n-1, k = n/2;
double ss;
for(size_t it = 0; it < n; it++)
{
ss = yAxis(k);
const double ss = yAxis(k);
if (ss == s ) return k;
if (abs(static_cast<int>(i) - static_cast<int>(j)) <2)
{
Expand Down

0 comments on commit 2869487

Please sign in to comment.