From 3fbdbd9cf655286e5ba5e35971ad1f5ba5d043a7 Mon Sep 17 00:00:00 2001
From: Steven Hahn <hahnse@ornl.gov>
Date: Mon, 23 Mar 2020 08:53:00 -0400
Subject: [PATCH] Change passing by const reference to value

Signed-off-by: Steven Hahn <hahnse@ornl.gov>
---
 Framework/Algorithms/src/Minus.cpp | 4 ++--
 Framework/Algorithms/src/Plus.cpp  | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/Framework/Algorithms/src/Minus.cpp b/Framework/Algorithms/src/Minus.cpp
index bd3b569932b..89ee3157151 100644
--- a/Framework/Algorithms/src/Minus.cpp
+++ b/Framework/Algorithms/src/Minus.cpp
@@ -33,13 +33,13 @@ void Minus::performBinaryOperation(const HistogramData::Histogram &lhs,
                                    HistogramData::HistogramE &EOut) {
   using std::placeholders::_1;
   std::transform(lhs.y().begin(), lhs.y().end(), YOut.begin(),
-                 [rhsY](const double &l) { return l - rhsY; });
+                 [rhsY](double l) { return l - rhsY; });
   // Only do E if non-zero, otherwise just copy
   if (rhsE != 0) {
     double rhsE2 = rhsE * rhsE;
     std::transform(
         lhs.e().begin(), lhs.e().end(), EOut.begin(),
-        [rhsE2](const double &l) { return std::sqrt(l * l + rhsE2); });
+        [rhsE2](double l) { return std::sqrt(l * l + rhsE2); });
   } else
     EOut = lhs.e();
 }
diff --git a/Framework/Algorithms/src/Plus.cpp b/Framework/Algorithms/src/Plus.cpp
index b97ec5d3f88..23f53f15e29 100644
--- a/Framework/Algorithms/src/Plus.cpp
+++ b/Framework/Algorithms/src/Plus.cpp
@@ -36,14 +36,14 @@ void Plus::performBinaryOperation(const HistogramData::Histogram &lhs,
                                   HistogramData::HistogramE &EOut) {
   using std::placeholders::_1;
   std::transform(lhs.y().begin(), lhs.y().end(), YOut.begin(),
-                 [rhsY](const double &l) { return l + rhsY; });
+                 [rhsY](double l) { return l + rhsY; });
   // Only do E if non-zero, otherwise just copy
 
   if (rhsE != 0.) {
     double rhsE2 = rhsE * rhsE;
     std::transform(
         lhs.e().begin(), lhs.e().end(), EOut.begin(),
-        [rhsE2](const double &l) { return std::sqrt(l * l + rhsE2); });
+        [rhsE2](double l) { return std::sqrt(l * l + rhsE2); });
   } else
     EOut = lhs.e();
 }
-- 
GitLab