Skip to content

Commit

Permalink
refs #5541 #5548 #5484. Fix warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
OwenArnold committed Jun 28, 2012
1 parent e4f8d0d commit 0705d18
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
Expand Up @@ -96,7 +96,7 @@ namespace Mantid
/// Load in details about the sample
void loadSampleData(DataObjects::Workspace2D_sptr, Mantid::NeXus::NXEntry & entry);
/// Load log data from the nexus file
void loadLogs(DataObjects::Workspace2D_sptr, int period = 1);
void loadLogs(DataObjects::Workspace2D_sptr);
// Load a given period into the workspace
void loadPeriodData(int64_t period, Mantid::NeXus::NXEntry & entry, DataObjects::Workspace2D_sptr local_workspace);
// Load a data block
Expand Down
3 changes: 1 addition & 2 deletions Code/Mantid/Framework/DataHandling/src/LoadISISNexus2.cpp
Expand Up @@ -737,9 +737,8 @@ namespace Mantid
* /raw_data_1/runlog group of the file. Call to this method must be done
* within /raw_data_1 group.
* @param ws :: The workspace to load the logs to.
* @param period :: The period of this workspace
*/
void LoadISISNexus2::loadLogs(DataObjects::Workspace2D_sptr ws, int period)
void LoadISISNexus2::loadLogs(DataObjects::Workspace2D_sptr ws)
{
IAlgorithm_sptr alg = createSubAlgorithm("LoadNexusLogs", 0.0, 0.5);
alg->setPropertyValue("Filename", this->getProperty("Filename"));
Expand Down
3 changes: 2 additions & 1 deletion Code/Mantid/Framework/DataHandling/test/LoadISISNexusTest.h
Expand Up @@ -34,8 +34,9 @@ class LoadISISNexusTest : public CxxTest::TestSuite
// Helper method to check that the log data contains a specific period number entry.
void checkPeriodLogData(MatrixWorkspace_sptr workspace, int expectedPeriodNumber)
{
Property* p;
Property* p = NULL;
TS_ASSERT_THROWS_NOTHING(p = fetchPeriod(workspace, expectedPeriodNumber));
TS_ASSERT(p != NULL)
TSM_ASSERT_THROWS("Shouldn't have a period less than the expected entry", fetchPeriod(workspace, expectedPeriodNumber-1), Mantid::Kernel::Exception::NotFoundError);
TSM_ASSERT_THROWS("Shouldn't have a period greater than the expected entry", fetchPeriod(workspace, expectedPeriodNumber+1), Mantid::Kernel::Exception::NotFoundError);
Mantid::Kernel::TimeSeriesProperty<bool>* period_property = dynamic_cast<Mantid::Kernel::TimeSeriesProperty<bool>*>(p);
Expand Down
2 changes: 1 addition & 1 deletion Code/Mantid/Framework/MDAlgorithms/src/WeightedMeanMD.cpp
Expand Up @@ -137,7 +137,7 @@ namespace MDAlgorithms

//----------------------------------------------------------------------------------------------
/// Run the algorithm with a MDHisotWorkspace as output, scalar and operand
void WeightedMeanMD::execHistoScalar(Mantid::MDEvents::MDHistoWorkspace_sptr out, Mantid::DataObjects::WorkspaceSingleValue_const_sptr)
void WeightedMeanMD::execHistoScalar(Mantid::MDEvents::MDHistoWorkspace_sptr, Mantid::DataObjects::WorkspaceSingleValue_const_sptr)
{
throw std::runtime_error(this->name() + " can only be run with two MDHistoWorkspaces as inputs");
}
Expand Down
Expand Up @@ -198,7 +198,7 @@ class WeightedMeanMDTest : public CxxTest::TestSuite
double theta_shift=0.4;
for(size_t i = 0; i < 40; ++i)
{
double theta = 0.02 * i * pi;
double theta = 0.02 * double(i) * pi;
s1.push_back(std::sin(theta));
e1.push_back(std::sin(theta));
s2.push_back(std::sin(theta+theta_shift));
Expand Down
6 changes: 3 additions & 3 deletions Code/Mantid/Framework/MDEvents/test/QueryMDWorkspaceTest.h
Expand Up @@ -34,7 +34,7 @@ class QueryMDWorkspaceTest : public CxxTest::TestSuite
query.setRethrows(true);
query.setProperty("InputWorkspace", in_ws);
query.setProperty("OutputWorkspace", "QueryWS");
query.setProperty("Normalisation", "none");
query.setProperty("Normalisation", strNormalisation);
TSM_ASSERT_EQUALS("Invalid property setup", true, query.validateProperties());
}

Expand Down Expand Up @@ -118,8 +118,8 @@ class QueryMDWorkspaceTest : public CxxTest::TestSuite
const size_t nEvents = it->getNumEvents();

//Compare each signal and error result.
TS_ASSERT_DELTA(signalNotNormalised, signalNormalisedByNumEvents*nEvents, 0.0001);
TS_ASSERT_DELTA(errorNotNormalised, errorNormalisedByNumEvents*nEvents, 0.0001);
TS_ASSERT_DELTA(signalNotNormalised, signalNormalisedByNumEvents*double(nEvents), 0.0001);
TS_ASSERT_DELTA(errorNotNormalised, errorNormalisedByNumEvents*double(nEvents), 0.0001);
}

ADS.remove("QueryWS_A");
Expand Down

0 comments on commit 0705d18

Please sign in to comment.