From 153e7fa39c9b36bf6ed068eb49f498a962f4e12b Mon Sep 17 00:00:00 2001
From: Steven Hahn <hahnse@ornl.gov>
Date: Wed, 17 Feb 2016 10:53:03 -0500
Subject: [PATCH] Remove unnecessary casts.

---
 Framework/Crystal/src/IntegratePeakTimeSlices.cpp | 7 +++----
 Framework/DataHandling/src/LoadEventNexus.cpp     | 8 ++++----
 2 files changed, 7 insertions(+), 8 deletions(-)

diff --git a/Framework/Crystal/src/IntegratePeakTimeSlices.cpp b/Framework/Crystal/src/IntegratePeakTimeSlices.cpp
index faa8be02625..bcc0a311247 100644
--- a/Framework/Crystal/src/IntegratePeakTimeSlices.cpp
+++ b/Framework/Crystal/src/IntegratePeakTimeSlices.cpp
@@ -1730,13 +1730,12 @@ int IntegratePeakTimeSlices::find(Mantid::MantidVec const &X,
   if (sgn * (X[0] - time) >= 0)
     return 0;
 
-  if (sgn * (time - X[X.size() - 1]) >= 0)
+  if (sgn * (time - X[X.size() - 1u]) >= 0)
     return static_cast<int>(X.size()) - 1;
 
-  size_t end = static_cast<size_t>(X.size() - 1u);
+  size_t end = X.size() - 1u;
   for (size_t i = 0; i < end; i++) {
-    if (sgn * (time - X[i]) >= 0 &&
-        sgn * (X[i + static_cast<size_t>(1)] - time) >= 0)
+    if (sgn * (time - X[i]) >= 0 && sgn * (X[i + 1u] - time) >= 0)
       return static_cast<int>(i);
   }
 
diff --git a/Framework/DataHandling/src/LoadEventNexus.cpp b/Framework/DataHandling/src/LoadEventNexus.cpp
index 3c24ec67e2a..68fcf966848 100644
--- a/Framework/DataHandling/src/LoadEventNexus.cpp
+++ b/Framework/DataHandling/src/LoadEventNexus.cpp
@@ -1206,10 +1206,10 @@ void LoadEventNexus::init() {
   setPropertyGroup("FilterMonByTimeStart", grp4);
   setPropertyGroup("FilterMonByTimeStop", grp4);
 
-  declareProperty("SpectrumMin", static_cast<int32_t>(EMPTY_INT()),
-                  mustBePositive, "The number of the first spectrum to read.");
-  declareProperty("SpectrumMax", static_cast<int32_t>(EMPTY_INT()),
-                  mustBePositive, "The number of the last spectrum to read.");
+  declareProperty("SpectrumMin", EMPTY_INT(), mustBePositive,
+                  "The number of the first spectrum to read.");
+  declareProperty("SpectrumMax", EMPTY_INT(), mustBePositive,
+                  "The number of the last spectrum to read.");
   declareProperty(new ArrayProperty<int32_t>("SpectrumList"),
                   "A comma-separated list of individual spectra to read.");
 
-- 
GitLab