X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FInstrumentation%2Fgsdi.cxx;h=7a5e45481c9a1eef4727dcfed7e5acca2b9181ad;hb=9fa790bcac7e535bb06cd228ae15178f1b10b26f;hp=b624e6405c8455b859c9bf401dcc4fd0a9bc3658;hpb=2a40f9876fa609ecf800f9e494c64ba433e7ddbf;p=flightgear.git diff --git a/src/Instrumentation/gsdi.cxx b/src/Instrumentation/gsdi.cxx index b624e6405..7a5e45481 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)) { } @@ -68,7 +49,7 @@ GSDI::~GSDI() void GSDI::init() { - string branch; + std::string branch; branch = "/instrumentation/" + _name; SGPropertyNode *n = fgGetNode(branch.c_str(), _num, true); _serviceableN = n->getNode("serviceable", true);