summaryrefslogtreecommitdiffstats
path: root/src/XMLNode.cpp
diff options
context:
space:
mode:
authorWim van Aarle <wimvanaarle@gmail.com>2015-02-26 13:47:59 +0100
committerWim van Aarle <wimvanaarle@gmail.com>2015-02-26 13:47:59 +0100
commitcca150841cd1de4f3b4d24c1188263b9623bc511 (patch)
treedca9846737f33fd9173a53231bd0bec566fb6bb3 /src/XMLNode.cpp
parent065d9c6a18f2b8eececc608ce850a9a308ca6356 (diff)
downloadastra-cca150841cd1de4f3b4d24c1188263b9623bc511.tar.gz
astra-cca150841cd1de4f3b4d24c1188263b9623bc511.tar.bz2
astra-cca150841cd1de4f3b4d24c1188263b9623bc511.tar.xz
astra-cca150841cd1de4f3b4d24c1188263b9623bc511.zip
get_geometry now uses XML config object (for projections)
Diffstat (limited to 'src/XMLNode.cpp')
-rw-r--r--src/XMLNode.cpp10
1 files changed, 4 insertions, 6 deletions
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<std::string>(pfList[0]) : "";
+ for (int i = 1; i < _iSize; i++) {
+ str += "," + boost::lexical_cast<std::string>(pfList[i]);
}
+ setContent(str);
}
//-----------------------------------------------------------------------------