Commit 4a0fbc00 authored by Antti Soininen's avatar Antti Soininen
Browse files

Use pass-by-reference instead of copying.

Fixes coverity issue CID 1371482

Re #18948
parent 4f1feba6
......@@ -74,7 +74,7 @@ private:
const std::vector<std::vector<int>> &);
void loadSpectra(size_t &spec, const size_t numberOfTubes,
const std::vector<Mantid::detid_t> &detectorIDs,
NeXus::NXInt data, Mantid::API::Progress progress);
const NeXus::NXInt &data, Mantid::API::Progress &progress);
void runLoadInstrument();
......
......@@ -404,7 +404,7 @@ void LoadILLTOF2::loadDataIntoTheWorkSpace(
*/
void LoadILLTOF2::loadSpectra(size_t &spec, const size_t numberOfTubes,
const std::vector<detid_t> &detectorIDs,
NXInt data, Progress progress) {
const NXInt &data, Progress &progress) {
for (size_t i = 0; i < numberOfTubes; ++i) {
for (size_t j = 0; j < m_numberOfPixelsPerTube; ++j) {
int *data_p = &data(static_cast<int>(i), static_cast<int>(j), 0);
......
Markdown is supported
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