From cca150841cd1de4f3b4d24c1188263b9623bc511 Mon Sep 17 00:00:00 2001 From: Wim van Aarle Date: Thu, 26 Feb 2015 13:47:59 +0100 Subject: get_geometry now uses XML config object (for projections) --- src/XMLNode.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'src/XMLNode.cpp') diff --git a/src/XMLNode.cpp b/src/XMLNode.cpp index a5b6796..4b2bdf4 100644 --- a/src/XMLNode.cpp +++ b/src/XMLNode.cpp @@ -448,13 +448,11 @@ void XMLNode::setContent(float32 _fValue) // Set content - LIST void XMLNode::setContent(float32* pfList, int _iSize) { - addAttribute("listsize", _iSize); - for (int i = 0; i < _iSize; i++) { - XMLNode* item = addChildNode("ListItem"); - item->addAttribute("index", i); - item->addAttribute("value",pfList[i]); - delete item; + std::string str = (_iSize > 0) ? boost::lexical_cast(pfList[0]) : ""; + for (int i = 1; i < _iSize; i++) { + str += "," + boost::lexical_cast(pfList[i]); } + setContent(str); } //----------------------------------------------------------------------------- -- cgit v1.2.3