Commit 239f890b authored by Hahn, Steven's avatar Hahn, Steven
Browse files

fix build issues that came up



Signed-off-by: Hahn, Steven's avatarSteven Hahn <hahnse@ornl.gov>
parent 1e0f1444
......@@ -514,20 +514,19 @@ public:
// Check if this class has an oriented lattice on a sample object
virtual bool hasOrientedLattice() const override;
virtual std::pair<size_t, size_t> find(double value)
:
virtual std::pair<int64_t, int64_t> find(double value) const;
//=====================================================================================
// End IMDWorkspace methods
//=====================================================================================
//=====================================================================================
// End IMDWorkspace methods
//=====================================================================================
//=====================================================================================
// Image methods
//=====================================================================================
//=====================================================================================
// Image methods
//=====================================================================================
/// Get start and end x indices for images
std::pair<size_t, size_t> getImageStartEndXIndices(
size_t i, double startX, double endX) const;
/// Get start and end x indices for images
std::pair<size_t, size_t> getImageStartEndXIndices(size_t i, double startX,
double endX) const;
/// Create an image of Ys.
MantidImage_sptr getImageY(size_t start = 0, size_t stop = 0,
size_t width = 0, double startX = EMPTY_DBL(),
......
......@@ -1931,14 +1931,13 @@ MantidImage_sptr MatrixWorkspace::getImage(
return image;
}
std::pair<size_t, size_t> MatrixWorkspace::find(double value) {
std::pair<size_t, size_t> out(-1, -1);
const int64_t numHists =
static_cast<int64_t>(inputWorkspace->getNumberHistograms());
std::pair<int64_t, int64_t> MatrixWorkspace::find(double value) const {
std::pair<int64_t, int64_t> out(-1, -1);
const int64_t numHists = static_cast<int64_t>(this->getNumberHistograms());
for (int64_t i = 0; i < numHists; ++i) {
const auto &Y = inputEventWorkspace->y(i);
if (auto it = std::find(Y.begin(), Y.end(), 0.), it != Y.end()) {
out = {i, std::distance(Y.begin().it)};
const auto &Y = this->y(i);
if (auto it = std::find(Y.begin(), Y.end(), value); it != Y.end()) {
out = {i, std::distance(Y.begin(), it)};
break;
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment