From 4a96bab3ca8dfb21b515c65ae038eea91dba8b4f Mon Sep 17 00:00:00 2001 From: Karl Palmen Date: Mon, 9 Dec 2013 15:39:18 +0000 Subject: [PATCH] Activate new code and remove unneeded AutoPtr re #8546 Signed-off-by: Karl Palmen --- Code/Mantid/Framework/DataHandling/src/LoadParameterFile.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Code/Mantid/Framework/DataHandling/src/LoadParameterFile.cpp b/Code/Mantid/Framework/DataHandling/src/LoadParameterFile.cpp index 805a32141161..a654ebc6865b 100644 --- a/Code/Mantid/Framework/DataHandling/src/LoadParameterFile.cpp +++ b/Code/Mantid/Framework/DataHandling/src/LoadParameterFile.cpp @@ -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) @@ -147,7 +148,7 @@ void LoadParameterFile::execManually(bool useString, std::string filename, std:: } // Get pointer to root element - AutoPtr pRootElem = pDoc->documentElement(); + Element* pRootElem = pDoc->documentElement(); if ( !pRootElem->hasChildNodes() ) { throw Kernel::Exception::InstrumentDefinitionError("No root element in XML Parameter file", filename);