From 4a0fbc007423f0b18ca55f06914fbd09a00346ba Mon Sep 17 00:00:00 2001
From: Antti Soininen <soininen@ill.fr>
Date: Thu, 18 May 2017 11:08:05 +0200
Subject: [PATCH] Use pass-by-reference instead of copying.

Fixes coverity issue CID 1371482

Re #18948
---
 Framework/DataHandling/inc/MantidDataHandling/LoadILLTOF2.h | 2 +-
 Framework/DataHandling/src/LoadILLTOF2.cpp                  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/Framework/DataHandling/inc/MantidDataHandling/LoadILLTOF2.h b/Framework/DataHandling/inc/MantidDataHandling/LoadILLTOF2.h
index ca7c8b2f328..30ad9480441 100644
--- a/Framework/DataHandling/inc/MantidDataHandling/LoadILLTOF2.h
+++ b/Framework/DataHandling/inc/MantidDataHandling/LoadILLTOF2.h
@@ -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();
 
diff --git a/Framework/DataHandling/src/LoadILLTOF2.cpp b/Framework/DataHandling/src/LoadILLTOF2.cpp
index 0ae774efd20..5ff8014cd7b 100644
--- a/Framework/DataHandling/src/LoadILLTOF2.cpp
+++ b/Framework/DataHandling/src/LoadILLTOF2.cpp
@@ -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);
-- 
GitLab