From 31fea1bd1694a77d76c70039b0656638a792d011 Mon Sep 17 00:00:00 2001 From: Russell Taylor <taylorrj@ornl.gov> Date: Wed, 7 Mar 2012 16:25:31 -0500 Subject: [PATCH] These should be the last VS (64 bit) warnings. Re #4473. --- .../src/SaveToSNSHistogramNexus.cpp | 25 +++++++++---------- .../Framework/PythonInterface/CMakeLists.txt | 3 +++ 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/Code/Mantid/Framework/DataHandling/src/SaveToSNSHistogramNexus.cpp b/Code/Mantid/Framework/DataHandling/src/SaveToSNSHistogramNexus.cpp index 267b40bba02..26cf960a436 100644 --- a/Code/Mantid/Framework/DataHandling/src/SaveToSNSHistogramNexus.cpp +++ b/Code/Mantid/Framework/DataHandling/src/SaveToSNSHistogramNexus.cpp @@ -344,26 +344,25 @@ namespace DataHandling // Offset into array. size_t index = size_t(slabx)*size_t(dataDimensions[1])*size_t(dataDimensions[2]) + size_t(y)*size_t(dataDimensions[2]); - if (doBoth) - { - const MantidVec & Y = inputWorkspace->readY(wi); - const MantidVec & E = inputWorkspace->readE(wi); - std::copy(Y.begin(), Y.end(), data+index); - std::copy(E.begin(), E.end(), errors+index); - } - else + const MantidVec & Y = inputWorkspace->readY(wi); + const MantidVec & E = inputWorkspace->readE(wi); + + for ( size_t i = 0; i < Y.size(); ++i ) { - if (doErrors) + if ( doErrors ) { - const MantidVec & E = inputWorkspace->readE(wi); - std::copy(E.begin(), E.end(), data+index); + data[i+index] = static_cast<float>(E[i]); } else { - const MantidVec & Y = inputWorkspace->readY(wi); - std::copy(Y.begin(), Y.end(), data+index); + data[i+index] = static_cast<float>(Y[i]); + if ( doBoth ) + { + errors[i+index] = static_cast<float>(E[i]); + } } } + PARALLEL_END_INTERUPT_REGION } PARALLEL_CHECK_INTERUPT_REGION diff --git a/Code/Mantid/Framework/PythonInterface/CMakeLists.txt b/Code/Mantid/Framework/PythonInterface/CMakeLists.txt index f39c849b364..5c23ba75549 100644 --- a/Code/Mantid/Framework/PythonInterface/CMakeLists.txt +++ b/Code/Mantid/Framework/PythonInterface/CMakeLists.txt @@ -62,6 +62,9 @@ set ( TEST_FILES if ( CXXTEST_FOUND ) cxxtest_add_test ( PythonInterfaceTest ${TEST_FILES} ) + if ( WIN32 ) + set_target_properties( PythonInterfaceTest PROPERTIES COMPILE_FLAGS "/w44244" ) + endif () target_link_libraries( PythonInterfaceTest PythonKernelModule PythonAPIModule ) add_dependencies ( FrameworkTests PythonInterfaceTest ) # Add to the 'UnitTests' group in VS -- GitLab