]> git.mxchange.org Git - flightgear.git/commitdiff
Property patches from Frederic Bouvier:
authordavid <david>
Sat, 11 May 2002 00:59:26 +0000 (00:59 +0000)
committerdavid <david>
Sat, 11 May 2002 00:59:26 +0000 (00:59 +0000)
The FlightGear patch is to take account the change in the getChildren
function that now returns a vector<SGPropertyNode_ptr>. If the
removeChild functionnality is to be added in FlightGear, all those
SGPropertyNode * floating around should be changed to
SGPropertyNode_ptr.

src/Cockpit/panel_io.cxx
src/Input/input.cxx
src/Main/logger.cxx
src/Model/model.cxx
src/Model/modelmgr.cxx
src/Objects/matlib.cxx
src/Sound/fg_sound.cxx

index ed72c47ebb01afcd8deb2b7412a6800db352c738..14f4358af25ecf966eddae722df9fc88ccfb7241 100644 (file)
@@ -183,7 +183,7 @@ readAction (const SGPropertyNode * node, float w_scale, float h_scale)
 
   FGPanelAction * action = new FGPanelAction(button, x, y, w, h);
 
-  vector<const SGPropertyNode *>bindings = node->getChildren("binding");
+  vector<SGPropertyNode_ptr>bindings = node->getChildren("binding");
   for (unsigned int i = 0; i < bindings.size(); i++) {
     SG_LOG(SG_INPUT, SG_INFO, "Reading binding "
           << bindings[i]->getStringValue("command"));
index 41edac95a8e8cdb515e2b6ea86960678781dcfc7..bf6f446172eb2775c2e5459cbbe942df4231adf4 100644 (file)
@@ -451,7 +451,7 @@ FGInput::_init_keyboard ()
     key_nodes = fgGetNode("/input/keyboard", true);
   }
   
-  vector<SGPropertyNode *> keys = key_nodes->getChildren("key");
+  vector<SGPropertyNode_ptr> keys = key_nodes->getChildren("key");
   for (unsigned int i = 0; i < keys.size(); i++) {
     int index = keys[i]->getIndex();
     SG_LOG(SG_INPUT, SG_DEBUG, "Binding key " << index);
@@ -810,7 +810,7 @@ FGInput::_read_bindings (const SGPropertyNode * node,
                         int modifiers)
 {
   SG_LOG(SG_INPUT, SG_DEBUG, "Reading all bindings");
-  vector<const SGPropertyNode *> bindings = node->getChildren("binding");
+  vector<SGPropertyNode_ptr> bindings = node->getChildren("binding");
   for (unsigned int i = 0; i < bindings.size(); i++) {
     SG_LOG(SG_INPUT, SG_DEBUG, "Reading binding "
           << bindings[i]->getStringValue("command"));
index 7958300bbe0b93a53091a6384d6c03f6d1dd1f60..250b4b05393ee9398dd6b66d3621dafa90a4a1d6 100644 (file)
@@ -39,7 +39,7 @@ FGLogger::init ()
   if (logging == 0)
     return;
 
-  vector<SGPropertyNode *> children = logging->getChildren("log");
+  vector<SGPropertyNode_ptr> children = logging->getChildren("log");
   for (unsigned int i = 0; i < children.size(); i++) {
     _logs.push_back(Log());
     Log &log = _logs[_logs.size()-1];
@@ -52,7 +52,7 @@ FGLogger::init ()
       SG_LOG(SG_INPUT, SG_ALERT, "Cannot write log to " << filename);
       continue;
     }
-    vector<SGPropertyNode *> entries = child->getChildren("entry");
+    vector<SGPropertyNode_ptr> entries = child->getChildren("entry");
     (*log.output) << "Time";
     for (unsigned int j = 0; j < entries.size(); j++) {
       SGPropertyNode * entry = entries[j];
index 08738012846d94de4bfb247159129b1f5b25373e..1baf886735dd4e9760aaeaddc94ca080fd010fde 100644 (file)
@@ -134,7 +134,7 @@ read_interpolation_table (const SGPropertyNode * props)
   const SGPropertyNode * table_node = props->getNode("interpolation");
   if (table_node != 0) {
     SGInterpTable * table = new SGInterpTable();
-    vector<const SGPropertyNode *> entries = table_node->getChildren("entry");
+    vector<SGPropertyNode_ptr> entries = table_node->getChildren("entry");
     for (int i = 0; i < entries.size(); i++)
       table->addEntry(entries[i]->getDoubleValue("ind", 0.0),
                      entries[i]->getDoubleValue("dep", 0.0));
@@ -223,10 +223,10 @@ FG3DModel::init (const string &path)
   _location = (FGLocation *) new FGLocation;
 
                                 // Load animations
-  vector<SGPropertyNode *> animation_nodes = props.getChildren("animation");
+  vector<SGPropertyNode_ptr> animation_nodes = props.getChildren("animation");
   unsigned int i;
   for (i = 0; i < animation_nodes.size(); i++) {
-    vector<SGPropertyNode *> name_nodes =
+    vector<SGPropertyNode_ptr> name_nodes =
       animation_nodes[i]->getChildren("object-name");
     if (name_nodes.size() < 1) {
       Animation * animation = make_animation(0, animation_nodes[i]);
index 2a0ecc5708e63bd55fede784bf3577fe9ecec222..680230897cec7562978e3dd94abb9750212412cc 100644 (file)
@@ -28,7 +28,7 @@ FGModelMgr::~FGModelMgr ()
 void
 FGModelMgr::init ()
 {
-  vector<SGPropertyNode *> model_nodes =
+  vector<SGPropertyNode_ptr> model_nodes =
     fgGetNode("/models", true)->getChildren("model");
   for (int i = 0; i < model_nodes.size(); i++) {
     SGPropertyNode * node = model_nodes[i];
index 37128ef54d4859844a6ee7d73f308c2618e086be..82f496eeffc6831d300e1d42919794ae24e3318d 100644 (file)
@@ -86,7 +86,7 @@ bool FGMaterialLib::load( const string& mpath ) {
     if (!strcmp(node->getName(), "material")) {
       FGNewMat * m = new FGNewMat(node);
 
-      vector<const SGPropertyNode *>names = node->getChildren("name");
+      vector<SGPropertyNode_ptr>names = node->getChildren("name");
       for (unsigned int j = 0; j < names.size(); j++) {
        string name = names[j]->getStringValue();
        m->ref();
index 3701766c1997b3a24f8873795a936dca25bea8f3..51b7ecb72ee5eba4b4ae49eb8fdf189d8a745c98 100644 (file)
@@ -116,7 +116,7 @@ FGSound::init(SGPropertyNode *node)
    //
    unsigned int i;
    float v = 0.0;
-   vector<SGPropertyNode *> kids = node->getChildren("volume");
+   vector<SGPropertyNode_ptr> kids = node->getChildren("volume");
    for (i = 0; (i < kids.size()) && (i < FGSound::MAXPROP); i++) {
       _snd_prop volume;