From 43948038dc88778e7f113d7f1fbba159fefe299e Mon Sep 17 00:00:00 2001 From: Pete Peterson Date: Fri, 4 Oct 2024 15:09:22 -0400 Subject: [PATCH] Move to std::optional like the rest of mantid --- Framework/DataHandling/src/AlignAndFocusPowderSlim.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Framework/DataHandling/src/AlignAndFocusPowderSlim.cpp b/Framework/DataHandling/src/AlignAndFocusPowderSlim.cpp index 8bde87849352..75c20fff9398 100644 --- a/Framework/DataHandling/src/AlignAndFocusPowderSlim.cpp +++ b/Framework/DataHandling/src/AlignAndFocusPowderSlim.cpp @@ -86,10 +86,10 @@ class Histogrammer { } } - boost::optional findBin(const double tof) const { + std::optional findBin(const double tof) const { // return boost::none; if (tof < m_xmin || tof >= m_xmax) { - return boost::none; + return std::nullopt; } else { return m_findBin(*m_binedges, tof, m_bin_divisor, m_bin_offset, true); } @@ -101,7 +101,7 @@ class Histogrammer { double m_xmin; double m_xmax; const std::vector *m_binedges; - boost::optional (*m_findBin)(const MantidVec &, const double, const double, const double, const bool); + std::optional (*m_findBin)(const MantidVec &, const double, const double, const double, const bool); }; template class ProcessEventsTask { @@ -118,7 +118,7 @@ template class ProcessEventsTask { const auto binnum = m_histogrammer->findBin(tof); if (binnum) - y_temp->at(binnum.get())++; + y_temp->at(binnum.value())++; } }