diff --git a/Framework/Algorithms/src/ExtractSpectra.cpp b/Framework/Algorithms/src/ExtractSpectra.cpp index 2924ac0521123be66d8fa8194c30c638b12d025f..c66f64083547ee6f81d59c361d24535a062b4051 100644 --- a/Framework/Algorithms/src/ExtractSpectra.cpp +++ b/Framework/Algorithms/src/ExtractSpectra.cpp @@ -164,11 +164,11 @@ void ExtractSpectra::execHistogram() { } auto &oldY = m_inputWorkspace->y(i); - outputWorkspace->mutableY(j) = HistogramData::HistogramY( - oldY.begin() + m_minX, oldY.begin() + (m_maxX - m_histogram)); + outputWorkspace->mutableY(j).assign(oldY.begin() + m_minX, + oldY.begin() + (m_maxX - m_histogram)); auto &oldE = m_inputWorkspace->e(i); - outputWorkspace->mutableE(j) = HistogramData::HistogramE( - oldE.begin() + m_minX, oldE.begin() + (m_maxX - m_histogram)); + outputWorkspace->mutableE(j).assign(oldE.begin() + m_minX, + oldE.begin() + (m_maxX - m_histogram)); // copy over the axis entry for each spectrum, regardless of the type of // axes present