1
0
Fork 0

Clarify warnings from fgUntie, and fix one source of such warnings, in FGInterface.

This commit is contained in:
James Turner 2010-07-01 02:04:16 +01:00
parent c3b9676e22
commit fec7cb977c
2 changed files with 17 additions and 2 deletions

View file

@ -410,6 +410,10 @@ FGInterface::bind ()
void
FGInterface::unbind ()
{
if (!bound) {
return;
}
bound = false;
fgUntie("/position/latitude-deg");

View file

@ -827,10 +827,21 @@ fgSetWritable (const char * name, bool state)
}
void
fgUntie (const char * name)
fgUntie(const char * name)
{
if (!globals->get_props()->untie(name))
SGPropertyNode* node = globals->get_props()->getNode(name);
if (!node) {
SG_LOG(SG_GENERAL, SG_WARN, "fgUntie: unknown property " << name);
return;
}
if (!node->isTied()) {
return;
}
if (!node->untie()) {
SG_LOG(SG_GENERAL, SG_WARN, "Failed to untie property " << name);
}
}