diff --git a/src/Autopilot/xmlauto.cxx b/src/Autopilot/xmlauto.cxx index 392c7b1f4..9ddcaf32b 100644 --- a/src/Autopilot/xmlauto.cxx +++ b/src/Autopilot/xmlauto.cxx @@ -818,17 +818,13 @@ bool FGXMLAutopilot::build() { string name = node->getName(); // cout << name << endl; if ( name == "pid-controller" ) { - FGXMLAutoComponent *c = new FGPIDController( node ); - components.push_back( c ); + components.push_back( new FGPIDController( node ) ); } else if ( name == "pi-simple-controller" ) { - FGXMLAutoComponent *c = new FGPISimpleController( node ); - components.push_back( c ); + components.push_back( new FGPISimpleController( node ) ); } else if ( name == "predict-simple" ) { - FGXMLAutoComponent *c = new FGPredictor( node ); - components.push_back( c ); + components.push_back( new FGPredictor( node ) ); } else if ( name == "filter" ) { - FGXMLAutoComponent *c = new FGDigitalFilter( node ); - components.push_back( c ); + components.push_back( new FGDigitalFilter( node ) ); } else { SG_LOG( SG_ALL, SG_ALERT, "Unknown top level section: " << name ); diff --git a/src/Autopilot/xmlauto.hxx b/src/Autopilot/xmlauto.hxx index a09b73a2a..08f449424 100644 --- a/src/Autopilot/xmlauto.hxx +++ b/src/Autopilot/xmlauto.hxx @@ -52,7 +52,7 @@ SG_USING_STD(deque); * Base class for other autopilot components */ -class FGXMLAutoComponent { +class FGXMLAutoComponent : public SGReferenced { protected: @@ -275,7 +275,7 @@ public: protected: - typedef vector comp_list; + typedef vector > comp_list; private: diff --git a/src/GUI/dialog.cxx b/src/GUI/dialog.cxx index 929f4f8a5..6ca629438 100644 --- a/src/GUI/dialog.cxx +++ b/src/GUI/dialog.cxx @@ -813,11 +813,11 @@ FGDialog::setColor(puObject * object, SGPropertyNode * props, int which) if (type == "textbox" && props->getBoolValue("editable")) type += "-editable"; - FGColor *c = new FGColor(_gui->getColor("background")); - c->merge(_gui->getColor(type)); - c->merge(props->getNode("color")); - if (c->isValid()) - object->setColourScheme(c->red(), c->green(), c->blue(), c->alpha()); + FGColor c(_gui->getColor("background")); + c.merge(_gui->getColor(type)); + c.merge(props->getNode("color")); + if (c.isValid()) + object->setColourScheme(c.red(), c.green(), c.blue(), c.alpha()); const struct { int mask; @@ -840,20 +840,20 @@ FGDialog::setColor(puObject * object, SGPropertyNode * props, int which) for (int i = 0; i < numcol; i++) { bool dirty = false; - c->clear(); - c->setAlpha(1.0); + c.clear(); + c.setAlpha(1.0); - dirty |= c->merge(_gui->getColor(type + '-' + pucol[i].name)); + dirty |= c.merge(_gui->getColor(type + '-' + pucol[i].name)); if (which & pucol[i].mask) - dirty |= c->merge(props->getNode("color")); + dirty |= c.merge(props->getNode("color")); - if ((pucol[i].mask == LABEL) && !c->isValid()) - dirty |= c->merge(_gui->getColor("label")); + if ((pucol[i].mask == LABEL) && !c.isValid()) + dirty |= c.merge(_gui->getColor("label")); - dirty |= c->merge(props->getNode(pucol[i].cname)); + dirty |= c.merge(props->getNode(pucol[i].cname)); - if (c->isValid() && dirty) - object->setColor(pucol[i].id, c->red(), c->green(), c->blue(), c->alpha()); + if (c.isValid() && dirty) + object->setColor(pucol[i].id, c.red(), c.green(), c.blue(), c.alpha()); } } diff --git a/src/Input/input.cxx b/src/Input/input.cxx index 1bf4b962a..09ef2c21d 100644 --- a/src/Input/input.cxx +++ b/src/Input/input.cxx @@ -1124,6 +1124,8 @@ FGInput::mouse_mode::~mouse_mode () FGInput::mouse::mouse () : x(-1), y(-1), + save_x(-1), + save_y(-1), nModes(1), current_mode(0), modes(0)