diff options
| author | louis <louis.braun@gmx.de> | 2014-11-29 16:00:42 +0100 |
|---|---|---|
| committer | louis <louis.braun@gmx.de> | 2014-11-29 16:00:42 +0100 |
| commit | 714ee26b1bdcfdac2968d7dcf885803074c4aa57 (patch) | |
| tree | 4bb41dc5f7f565f95c5f1a14fea4531a36ace5fe /libtemplate/xmlparser.c | |
| parent | da25976325f4797da06b350685ee93fed07c4f97 (diff) | |
| download | vdr-plugin-skindesigner-714ee26b1bdcfdac2968d7dcf885803074c4aa57.tar.gz vdr-plugin-skindesigner-714ee26b1bdcfdac2968d7dcf885803074c4aa57.tar.bz2 | |
fixed bug that global double vars are not working
Diffstat (limited to 'libtemplate/xmlparser.c')
| -rw-r--r-- | libtemplate/xmlparser.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libtemplate/xmlparser.c b/libtemplate/xmlparser.c index bdaf0bb..8931f2f 100644 --- a/libtemplate/xmlparser.c +++ b/libtemplate/xmlparser.c @@ -145,11 +145,6 @@ bool cXmlParser::ParseView(void) { xmlAttrPtr attr = node->properties; vector<pair<string, string> > attribs; ParseAttributes(attr, node, attribs); - /* - for (vector<pair<string, string> >::iterator it = attribs.begin(); it != attribs.end(); it++) { - esyslog("skindesigner: attribute %s value %s", (it->first).c_str(), (it->second).c_str()); - } - */ ParseViewElement(node->name, node->xmlChildrenNode, attribs); } else if (view->ValidViewList((const char*)node->name)) { ParseViewList(node); @@ -360,6 +355,11 @@ void cXmlParser::InsertVariable(string name, string type, string value) { int val = atoi(value.c_str()); globals->intVars.insert(pair<string, int>(name, val)); } else if (!type.compare("double")) { + if (config.replaceDecPoint) { + if (value.find_first_of('.') != string::npos) { + std::replace( value.begin(), value.end(), '.', config.decPoint); + } + } double val = atof(value.c_str()); globals->doubleVars.insert(pair<string, double>(name, val)); } else if (!type.compare("string")) { |
