Skip to content

Commit

Permalink
Re #4158. Replaced my lambda functions
Browse files Browse the repository at this point in the history
  • Loading branch information
mantid-roman committed Apr 2, 2012
1 parent a11e8da commit 35fb59b
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions Code/Mantid/Framework/CurveFitting/src/FitMW.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,11 @@ namespace
size_t m_nParams; ///< number of parameters / second dimension
std::vector<double> m_data; ///< data storage
};

bool greaterIsLess(double x1, double x2)
{
return x1 > x2;
}
}

using namespace Kernel;
Expand Down Expand Up @@ -185,8 +190,10 @@ namespace
{
std::swap(startX,endX);
}
from = std::lower_bound(X.begin(),X.end(),startX,([](double x1,double x2)->bool{return x1 > x2;}));
to = std::upper_bound(from,X.end(),endX,([](double x1,double x2)->bool{return x1 > x2;}));
//from = std::lower_bound(X.begin(),X.end(),startX,([](double x1,double x2)->bool{return x1 > x2;}));
//to = std::upper_bound(from,X.end(),endX,([](double x1,double x2)->bool{return x1 > x2;}));
from = std::lower_bound(X.begin(),X.end(),startX,greaterIsLess);
to = std::upper_bound(from,X.end(),endX,greaterIsLess);
}
}

Expand Down

0 comments on commit 35fb59b

Please sign in to comment.