From a8c698e2e98745ced78340fbed093437a338e986 Mon Sep 17 00:00:00 2001 From: Pete Peterson <petersonpf@ornl.gov> Date: Mon, 6 Jul 2015 15:24:00 -0400 Subject: [PATCH] Don't truncate floats when coercing to double --- Code/Mantid/Framework/DataHandling/src/LoadDiffCal.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Code/Mantid/Framework/DataHandling/src/LoadDiffCal.cpp b/Code/Mantid/Framework/DataHandling/src/LoadDiffCal.cpp index 02b3a9509ed..259be0c3e5f 100644 --- a/Code/Mantid/Framework/DataHandling/src/LoadDiffCal.cpp +++ b/Code/Mantid/Framework/DataHandling/src/LoadDiffCal.cpp @@ -125,7 +125,7 @@ std::vector<NumT> readArrayCoerce(DataSet &dataset, const DataType &desiredDataT std::vector<float> temp(dataSpace.getSelectNpoints()); dataset.read(&temp[0], dataType, dataSpace); for( auto it = temp.begin(); it != temp.end(); ++it) - result.push_back(static_cast<int32_t>(*it)); + result.push_back(static_cast<NumT>(*it)); } else { throw DataTypeIException(); } -- GitLab