From 47fe3421585302f2101691a685ab99b0e1ad5cfc Mon Sep 17 00:00:00 2001
From: Willem Jan Palenstijn <wjp@usecode.org>
Date: Fri, 1 May 2015 17:48:32 +0200
Subject: Change XMLNode* to XMLNode

An XMLNode object is already simply a pointer, so no need to dynamically allocate XMLNodes.
---
 src/CudaDartSmoothingAlgorithm.cpp | 20 +++++++++-----------
 1 file changed, 9 insertions(+), 11 deletions(-)

(limited to 'src/CudaDartSmoothingAlgorithm.cpp')

diff --git a/src/CudaDartSmoothingAlgorithm.cpp b/src/CudaDartSmoothingAlgorithm.cpp
index 2f2103f..7e22809 100644
--- a/src/CudaDartSmoothingAlgorithm.cpp
+++ b/src/CudaDartSmoothingAlgorithm.cpp
@@ -65,34 +65,32 @@ bool CCudaDartSmoothingAlgorithm::initialize(const Config& _cfg)
 	ConfigStackCheck<CAlgorithm> CC("CudaDartSmoothingAlgorithm", this, _cfg);
 
 	// reconstruction data
-	XMLNode* node = _cfg.self->getSingleNode("InDataId");
+	XMLNode node = _cfg.self.getSingleNode("InDataId");
 	ASTRA_CONFIG_CHECK(node, "CudaDartMask", "No InDataId tag specified.");
-	int id = boost::lexical_cast<int>(node->getContent());
+	int id = boost::lexical_cast<int>(node.getContent());
 	m_pIn = dynamic_cast<CFloat32VolumeData2D*>(CData2DManager::getSingleton().get(id));
-	ASTRA_DELETE(node);
 	CC.markNodeParsed("InDataId");
 
 	// reconstruction data
-	node = _cfg.self->getSingleNode("OutDataId");
+	node = _cfg.self.getSingleNode("OutDataId");
 	ASTRA_CONFIG_CHECK(node, "CudaDartMask", "No OutDataId tag specified.");
-	id = boost::lexical_cast<int>(node->getContent());
+	id = boost::lexical_cast<int>(node.getContent());
 	m_pOut = dynamic_cast<CFloat32VolumeData2D*>(CData2DManager::getSingleton().get(id));
-	ASTRA_DELETE(node);
 	CC.markNodeParsed("OutDataId");
 
 	// Option: GPU number
-	m_iGPUIndex = (int)_cfg.self->getOptionNumerical("GPUindex", -1);
-	m_iGPUIndex = (int)_cfg.self->getOptionNumerical("GPUIndex", m_iGPUIndex);
+	m_iGPUIndex = (int)_cfg.self.getOptionNumerical("GPUindex", -1);
+	m_iGPUIndex = (int)_cfg.self.getOptionNumerical("GPUIndex", m_iGPUIndex);
 	CC.markOptionParsed("GPUindex");
-	if (!_cfg.self->hasOption("GPUindex"))
+	if (!_cfg.self.hasOption("GPUindex"))
 		CC.markOptionParsed("GPUIndex");
 
 	// Option: Radius
-	m_fB = (float)_cfg.self->getOptionNumerical("Intensity", 0.3f);
+	m_fB = (float)_cfg.self.getOptionNumerical("Intensity", 0.3f);
 	CC.markOptionParsed("Intensity");
 
 	// Option: Radius
-	m_iRadius = (unsigned int)_cfg.self->getOptionNumerical("Radius", 1);
+	m_iRadius = (unsigned int)_cfg.self.getOptionNumerical("Radius", 1);
 	CC.markOptionParsed("Radius");
 
 
-- 
cgit v1.2.3