Commit 29a9f853 authored by Gigg, Martyn Anthony's avatar Gigg, Martyn Anthony
Browse files

Kill some compiler warnings. Refs #5742

parent 0548d786
......@@ -580,6 +580,8 @@ public:
{
value = m_testRun.getPropertyAsSingleValue(m_propName);
}
// Enure variable is used so that it is not optimised away by the compiler
value += 1.0;
}
Run m_testRun;
......
......@@ -467,7 +467,6 @@ std::list<API::MatrixWorkspace_sptr> MergeRuns::validateInputs(const std::vector
{
std::list<MatrixWorkspace_sptr> inWS;
size_t numSpec(0);
std::string xUnitID;
std::string YUnit;
bool dist(false);
......@@ -502,7 +501,6 @@ std::list<API::MatrixWorkspace_sptr> MergeRuns::validateInputs(const std::vector
// Check a few things are the same for all input workspaces
if ( i == 0 )
{
numSpec = ws->getNumberHistograms();
xUnitID = ws->getAxis(0)->unit()->unitID();
YUnit = ws->YUnit();
dist = ws->isDistribution();
......
......@@ -298,10 +298,6 @@ void TabulatedFunction::loadWorkspace(boost::shared_ptr<MatrixWorkspace> ws)
const bool hist = ws->isHistogramData();
const size_t nbins = ws->blocksize();
double last;
if ( hist ) { last = ws->readX(0)[nbins]; }
else { last = ws->readX(0)[nbins-1]; }
for ( size_t i = 0; i < nbins; i++ )
{
double x = 0.0;
......
......@@ -58,6 +58,8 @@ private:
TimeSeriesProperty<double>* sampleTemps = dynamic_cast<TimeSeriesProperty<double>* >(prop);
auto filteredLogStartTime = sampleTemps->nthTime(0);
auto filteredLogEndTime = sampleTemps->nthTime(sampleTemps->size()-1);
TS_ASSERT_EQUALS("2010-Mar-25 16:09:31.511000032",filteredLogStartTime.toSimpleString());
TS_ASSERT_EQUALS("2010-Mar-25 16:11:41.558003540",filteredLogEndTime.toSimpleString());
}
public:
......
......@@ -179,8 +179,7 @@ public:
" <zeropadding size=\"15\"/>"
"</instrument>";
FacilityInfo * fac = NULL;
TS_ASSERT_THROWS( fac = createInstInfoInMinimalFacility(instStr), std::runtime_error );
TS_ASSERT_THROWS( createInstInfoInMinimalFacility(instStr), std::runtime_error );
}
void test_error_1_in_multiple_zeropadding()
......@@ -191,8 +190,7 @@ public:
" <zeropadding size=\"nan\"/>"
"</instrument>";
FacilityInfo * fac = NULL;
TS_ASSERT_THROWS( fac = createInstInfoInMinimalFacility(instStr), std::runtime_error );
TS_ASSERT_THROWS( createInstInfoInMinimalFacility(instStr), std::runtime_error );
}
void test_error_2_in_multiple_zeropadding()
......@@ -203,8 +201,7 @@ public:
" <zeropadding size=\"8\" startRunNumber=\"nan\"/>"
"</instrument>";
FacilityInfo * fac = NULL;
TS_ASSERT_THROWS( fac = createInstInfoInMinimalFacility(instStr), std::runtime_error );
TS_ASSERT_THROWS( createInstInfoInMinimalFacility(instStr), std::runtime_error );
}
void test_error_3_in_multiple_zeropadding()
......@@ -215,8 +212,7 @@ public:
" <zeropadding startRunNumber=\"333\"/>"
"</instrument>";
FacilityInfo * fac = NULL;
TS_ASSERT_THROWS( fac = createInstInfoInMinimalFacility(instStr), std::runtime_error );
TS_ASSERT_THROWS( createInstInfoInMinimalFacility(instStr), std::runtime_error );
}
void test_equality_operator()
......
......@@ -244,16 +244,11 @@ std::string ConvertToMDEventsParams::identifyMatrixAlg(API::MatrixWorkspace_cons
}
// get optional Y axis which can be used in NoQ-kind of algorithms
bool is_detector_information_lost= false;
API::NumericAxis *pYAxis = dynamic_cast<API::NumericAxis *>(inMatrixWS->getAxis(1));
if(pYAxis){
std::string Dim2Unit = pYAxis->unit()->unitID();
ws_dim_units.push_back(Dim2Unit);
// if this is numeric axis, then the detector's information has been lost:
is_detector_information_lost=true;
}
//if Y axis of matix workspace contains some meaningful info, the detector information is certainly lost.
is_detector_information_lost = TargWSDescription.isDetInfoLost(inMatrixWS);
}
std::string Q_MODE_ID,DE_MODE_ID,CONV_MODE_ID,WS_ID;
int nQ_dims(0),ndE_dims(0);
......
......@@ -412,4 +412,4 @@ namespace MDEvents
} // namespace Mantid
} // namespace MDEvents
\ No newline at end of file
} // namespace MDEvents
......@@ -142,7 +142,7 @@ public:
if (sipCpp->text(row, col) != "")
sipRes = sipCpp->cell(row, col);
else {
sipRes = NULL;
sipRes = 0.0;
PyErr_SetString(PyExc_ValueError, "Empty table cell");
}
}
......
......@@ -19,7 +19,7 @@ RefMatrixWSImageView::RefMatrixWSImageView( MatrixWorkspace_sptr mat_ws )
// is closed
}
RefMatrixWSImageView::RefMatrixWSImageView( QString wps_name)
RefMatrixWSImageView::RefMatrixWSImageView( QString )
{
// std::cout << "wps name is : " << wps_name << std::endl;
}
......
......@@ -24,7 +24,7 @@ set( USE_PARAVIEW ON CACHE BOOL "Create paraview plugins. " )
find_package( ParaView )
if( ParaView_FOUND AND USE_PARAVIEW )
include( ${PARAVIEW_USE_FILE} )
include ( ${PARAVIEW_USE_FILE} )
add_subdirectory( VatesAPI )
add_subdirectory( ParaviewPlugins )
add_subdirectory( VatesSimpleGui )
......
# Use Qt4 as system package to avoid compiler warnings
include ( UseSystemQt4 )
add_subdirectory( RebinningCutterObjectPanel )
add_subdirectory( RebinningTransformObjectPanel )
add_subdirectory( QtWidgets )
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment