From 88b7d4f530eca48e684784bc0c8f45b412dec416 Mon Sep 17 00:00:00 2001 From: Thomas Geymayer Date: Thu, 6 Mar 2014 00:41:41 +0100 Subject: [PATCH] Update for SGPropertyNode changes. --- src/ATC/atcdialog.cxx | 12 ++++++------ src/Aircraft/replay.cxx | 4 ++-- src/Autopilot/autopilot.cxx | 2 +- src/Input/FGEventInput.cxx | 2 +- src/Input/FGJoystickInput.cxx | 2 +- src/Main/fg_init.cxx | 4 ++-- src/Main/globals.cxx | 6 +++--- src/Scripting/NasalSys.cxx | 2 +- src/Scripting/nasal-props.cxx | 6 +++--- 9 files changed, 20 insertions(+), 20 deletions(-) diff --git a/src/ATC/atcdialog.cxx b/src/ATC/atcdialog.cxx index 00c3e2c05..f2b96f464 100644 --- a/src/ATC/atcdialog.cxx +++ b/src/ATC/atcdialog.cxx @@ -89,7 +89,7 @@ void FGATCDialogNew::frequencySearch() SGPropertyNode_ptr button_group = getNamedNode(dlg, "quick-buttons"); // remove all dynamic airport/ATC buttons - button_group->removeChildren("button", false); + button_group->removeChildren("button"); AirportsWithATC filt; FGPositionedList results = FGPositioned::findWithinRange(globals->get_aircraft_position(), 50.0, &filt); @@ -98,7 +98,7 @@ void FGATCDialogNew::frequencySearch() SGPropertyNode *entry = button_group->getNode("button", r, true); copyProperties(button_group->getNode("button-template", true), entry); - entry->removeChildren("enabled", true); + entry->removeChildren("enabled"); entry->setStringValue("legend", results[r]->ident()); entry->setStringValue("binding[0]/icao", results[r]->ident()); } @@ -121,7 +121,7 @@ void FGATCDialogNew::frequencyDisplay(const std::string& ident) SGPropertyNode_ptr freq_group = getNamedNode(dlg, "frequency-list"); // remove all frequency entries - freq_group->removeChildren("group", false); + freq_group->removeChildren("group"); std::string uident(ident); atcUppercase(uident); @@ -151,7 +151,7 @@ void FGATCDialogNew::frequencyDisplay(const std::string& ident) // add frequency line (modified copy of ) SGPropertyNode *entry = freq_group->getNode("group", c, true); copyProperties(freq_group->getNode("group-template", true), entry); - entry->removeChildren("enabled", true); + entry->removeChildren("enabled"); entry->setStringValue("text[0]/label", comm->ident()); @@ -257,7 +257,7 @@ void FGATCDialogNew::update(double dt) { _gui->closeDialog(dialog_name); SGPropertyNode_ptr button_group = getNamedNode(dlg, "transmission-choice"); - button_group->removeChildren("button", false); + button_group->removeChildren("button"); const int bufsize = 32; char buf[bufsize]; @@ -268,7 +268,7 @@ void FGATCDialogNew::update(double dt) { fgSetBool(buf, false); SGPropertyNode *entry = button_group->getNode("button", commandNr, true); copyProperties(button_group->getNode("button-template", true), entry); - entry->removeChildren("enabled", true); + entry->removeChildren("enabled"); entry->setStringValue("property", buf); entry->setIntValue("keynum", '1' + commandNr); if (commandNr == 0) diff --git a/src/Aircraft/replay.cxx b/src/Aircraft/replay.cxx index c7008fd29..c77cea607 100644 --- a/src/Aircraft/replay.cxx +++ b/src/Aircraft/replay.cxx @@ -129,7 +129,7 @@ FGReplay::clear() } // clear messages belonging to old replay session - fgGetNode("/sim/replay/messages", 0, true)->removeChildren("msg", false); + fgGetNode("/sim/replay/messages", 0, true)->removeChildren("msg"); } /** @@ -1101,7 +1101,7 @@ FGReplay::listTapes(bool SameAircraftFilter, const SGPath& tapeDirectory) simgear::PathList list = dir.children(simgear::Dir::TYPE_FILE, ".fgtape"); SGPropertyNode* TapeList = fgGetNode("/sim/replay/tape-list", true); - TapeList->removeChildren("tape", false); + TapeList->removeChildren("tape"); int Index = 0; size_t l = aircraftType.size(); for (simgear::PathList::iterator it = list.begin(); it!=list.end(); ++it) diff --git a/src/Autopilot/autopilot.cxx b/src/Autopilot/autopilot.cxx index 8fa6a5cc8..0dc923679 100644 --- a/src/Autopilot/autopilot.cxx +++ b/src/Autopilot/autopilot.cxx @@ -110,7 +110,7 @@ void readInterfaceProperties( SGPropertyNode_ptr prop_root, // TODO should we keep the _attr_ node, as soon as the property browser is // able to cope with it? - (*it)->removeChild("_attr_", 0, false); + (*it)->removeChild("_attr_", 0); } } } diff --git a/src/Input/FGEventInput.cxx b/src/Input/FGEventInput.cxx index 495de3453..29bdc6e1d 100644 --- a/src/Input/FGEventInput.cxx +++ b/src/Input/FGEventInput.cxx @@ -386,6 +386,6 @@ void FGEventInput::RemoveDevice( unsigned index ) delete inputDevice; } - deviceNode = baseNode->removeChild("device", index, false); + deviceNode = baseNode->removeChild("device", index); } diff --git a/src/Input/FGJoystickInput.cxx b/src/Input/FGJoystickInput.cxx index 4cbeb1ae1..069e9d824 100644 --- a/src/Input/FGJoystickInput.cxx +++ b/src/Input/FGJoystickInput.cxx @@ -97,7 +97,7 @@ void FGJoystickInput::_remove(bool all) joystick* joy = &joysticks[i]; // do not remove predefined joysticks info on reinit if (all || (!joy->predefined)) - js_nodes->removeChild("js", i, false); + js_nodes->removeChild("js", i); joy->plibJS.reset(); joy->clearAxesAndButtons(); diff --git a/src/Main/fg_init.cxx b/src/Main/fg_init.cxx index 8eb812537..bf4b7f350 100644 --- a/src/Main/fg_init.cxx +++ b/src/Main/fg_init.cxx @@ -441,7 +441,7 @@ int fgInitConfig ( int argc, char **argv, bool reinit ) // Set /sim/fg-home and don't allow malign code to override it until // Nasal security is set up. Use FG_HOME if necessary. SGPropertyNode *home = fgGetNode("/sim", true); - home->removeChild("fg-home", 0, false); + home->removeChild("fg-home", 0); home = home->getChild("fg-home", 0, true); home->setStringValue(dataPath.c_str()); home->setAttribute(SGPropertyNode::WRITE, false); @@ -546,7 +546,7 @@ bool fgInitGeneral() { simgear::Dir cwd(simgear::Dir::current()); SGPropertyNode *curr = fgGetNode("/sim", true); - curr->removeChild("fg-current", 0, false); + curr->removeChild("fg-current", 0); curr = curr->getChild("fg-current", 0, true); curr->setStringValue(cwd.path().str()); curr->setAttribute(SGPropertyNode::WRITE, false); diff --git a/src/Main/globals.cxx b/src/Main/globals.cxx index 29377bb36..74e0656d8 100644 --- a/src/Main/globals.cxx +++ b/src/Main/globals.cxx @@ -275,7 +275,7 @@ void FGGlobals::set_fg_root (const std::string &root) { // remove /sim/fg-root before writing to prevent hijacking SGPropertyNode *n = fgGetNode("/sim", true); - n->removeChild("fg-root", 0, false); + n->removeChild("fg-root", 0); n = n->getChild("fg-root", 0, true); n->setStringValue(fg_root.c_str()); n->setAttribute(SGPropertyNode::WRITE, false); @@ -415,7 +415,7 @@ void FGGlobals::append_aircraft_path(const std::string& path) // make aircraft dirs available to Nasal SGPropertyNode* sim = fgGetNode("/sim", true); - sim->removeChild("fg-aircraft", index, false); + sim->removeChild("fg-aircraft", index); SGPropertyNode* n = sim->getChild("fg-aircraft", index, true); n->setStringValue(abspath); n->setAttribute(SGPropertyNode::WRITE, false); @@ -594,7 +594,7 @@ FGGlobals::resetPropertyRoot() // remove /sim/fg-root before writing to prevent hijacking SGPropertyNode *n = props->getNode("/sim", true); - n->removeChild("fg-root", 0, false); + n->removeChild("fg-root", 0); n = n->getChild("fg-root", 0, true); n->setStringValue(fg_root.c_str()); n->setAttribute(SGPropertyNode::WRITE, false); diff --git a/src/Scripting/NasalSys.cxx b/src/Scripting/NasalSys.cxx index 2cfbd77d7..b2f08fe01 100644 --- a/src/Scripting/NasalSys.cxx +++ b/src/Scripting/NasalSys.cxx @@ -795,7 +795,7 @@ void FGNasalSys::init() const char *s = "nasal-dir-initialized"; SGPropertyNode *signal = fgGetNode("/sim/signals", true); signal->setBoolValue(s, true); - signal->removeChildren(s, false); + signal->removeChildren(s); // Pull scripts out of the property tree, too loadPropertyScripts(); diff --git a/src/Scripting/nasal-props.cxx b/src/Scripting/nasal-props.cxx index ffc9a24a9..47530c03d 100644 --- a/src/Scripting/nasal-props.cxx +++ b/src/Scripting/nasal-props.cxx @@ -537,7 +537,7 @@ static naRef f_removeChild(naContext c, naRef me, int argc, naRef* args) if(!naIsString(child) || !naIsNum(index)) return naNil(); SGPropertyNode_ptr n = 0; try { - n = node->removeChild(naStr_data(child), (int)index.num, false); + n = node->removeChild(naStr_data(child), (int)index.num); } catch (const string& err) { naRuntimeError(c, (char *)err.c_str()); } @@ -557,14 +557,14 @@ static naRef f_removeChildren(naContext c, naRef me, int argc, naRef* args) if(naIsNil(argv) || naVec_size(argv) == 0) { // Remove all children for(int i = node->nChildren() - 1; i >=0; i--) - naVec_append(result, propNodeGhostCreate(c, node->removeChild(i, false))); + naVec_append(result, propNodeGhostCreate(c, node->removeChild(i))); } else { // Remove all children of a specified name naRef name = naVec_get(argv, 0); if(!naIsString(name)) return naNil(); try { vector children - = node->removeChildren(naStr_data(name), false); + = node->removeChildren(naStr_data(name)); for(unsigned int i=0; i