From 7fbcc9d3306260fda407111f46b46097f3fa7eca Mon Sep 17 00:00:00 2001 From: louis Date: Fri, 10 Oct 2014 15:32:38 +0200 Subject: support for global variables type 'double' --- libtemplate/xmlparser.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'libtemplate/xmlparser.c') diff --git a/libtemplate/xmlparser.c b/libtemplate/xmlparser.c index 8c21ed9..0e2c132 100644 --- a/libtemplate/xmlparser.c +++ b/libtemplate/xmlparser.c @@ -291,6 +291,9 @@ void cXmlParser::InsertVariable(string name, string type, string value) { if (!type.compare("int")) { int val = atoi(value.c_str()); globals->intVars.insert(pair(name, val)); + } else if (!type.compare("double")) { + double val = atof(value.c_str()); + globals->doubleVars.insert(pair(name, val)); } else if (!type.compare("string")) { globals->stringVars.insert(pair(name, value)); } -- cgit v1.2.3