Skip to content

Commit

Permalink
Activate new code and remove unneeded AutoPtr re #8546
Browse files Browse the repository at this point in the history
Signed-off-by: Karl Palmen <karl.palmen@stfc.ac.uk>
  • Loading branch information
KarlPalmen committed Dec 9, 2013
1 parent 86a24a8 commit 4a96bab
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Code/Mantid/Framework/DataHandling/src/LoadParameterFile.cpp
Expand Up @@ -99,12 +99,13 @@ void LoadParameterFile::exec()
std::string filename = getPropertyValue("Filename");

// Retrieve the parameter XML string from the properties
const Property * const parameterXMLProperty = getProperty("ParameterXML"); // to check whether it is default
std::string parameterXML = getPropertyValue("ParameterXML");

// Get the input workspace
const MatrixWorkspace_sptr localWorkspace = getProperty("Workspace");

execManually(false, filename, parameterXML, localWorkspace);
execManually(!parameterXMLProperty->isDefault(), filename, parameterXML, localWorkspace);
}

void LoadParameterFile::execManually(bool useString, std::string filename, std::string parameterXML, Mantid::API::ExperimentInfo_sptr localWorkspace)
Expand Down Expand Up @@ -147,7 +148,7 @@ void LoadParameterFile::execManually(bool useString, std::string filename, std::
}

// Get pointer to root element
AutoPtr<Element> pRootElem = pDoc->documentElement();
Element* pRootElem = pDoc->documentElement();
if ( !pRootElem->hasChildNodes() )
{
throw Kernel::Exception::InstrumentDefinitionError("No root element in XML Parameter file", filename);
Expand Down

0 comments on commit 4a96bab

Please sign in to comment.