X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FInstrumentation%2Fgsdi.cxx;h=acf11412d4cb50df3d1b769e080df5c96920a31e;hb=c6045147544badd6daefdcab9d4de1ed6936533b;hp=b624e6405c8455b859c9bf401dcc4fd0a9bc3658;hpb=2a40f9876fa609ecf800f9e494c64ba433e7ddbf;p=flightgear.git diff --git a/src/Instrumentation/gsdi.cxx b/src/Instrumentation/gsdi.cxx index b624e6405..acf11412d 100644 --- a/src/Instrumentation/gsdi.cxx +++ b/src/Instrumentation/gsdi.cxx @@ -36,27 +36,8 @@ GSDI::GSDI(SGPropertyNode *node) : - _name("gsdi"), - _num(0) -{ - for (int i = 0; i < node->nChildren(); ++i) { - SGPropertyNode *child = node->getChild(i); - string name = child->getName(); - - if (name == "name") { - _name = child->getStringValue(); - } else if (name == "number") { - _num = child->getIntValue(); - } else { - SG_LOG(SG_INSTR, SG_WARN, "Error in gsdi config logic"); - if (_name.length()) - SG_LOG(SG_INSTR, SG_WARN, "Section = " << _name); - } - } -} - - -GSDI::GSDI() + _name(node->getStringValue("name", "gsdi")), + _num(node->getIntValue("number", 0)) { }