1
0
Fork 0

let removelistener() return the number of remaining Nasal listeners. (We

need to return nil for errors and something else for success, so we can
as well return something (remotely) useful.)
This commit is contained in:
mfranz 2006-03-02 10:41:48 +00:00
parent e4fe99ce12
commit dcffb9d335

View file

@ -626,8 +626,9 @@ naRef FGNasalSys::setListener(int argc, naRef* args)
FGNasalListener *nl = new FGNasalListener(node, handler, this,
gcSave(handler));
_listener[_listenerId] = nl;
node->addChangeListener(nl, initial);
_listener[_listenerId] = nl;
return naNum(_listenerId++);
}
@ -647,6 +648,6 @@ naRef FGNasalSys::removeListener(int argc, naRef* args)
nl->_node->removeChangeListener(nl);
_listener.erase(i);
delete nl;
return id;
return naNum(_listener.size());
}