Property patches from Frederic Bouvier:
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.
This commit is contained in:
parent
56473dc28d
commit
f3eafe1007
7 changed files with 11 additions and 11 deletions
|
@ -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"));
|
||||
|
|
|
@ -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"));
|
||||
|
|
|
@ -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];
|
||||
|
|
|
@ -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]);
|
||||
|
|
|
@ -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];
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue