diff --git a/src/Autopilot/analogcomponent.hxx b/src/Autopilot/analogcomponent.hxx index f5682baeb..d6bedf871 100644 --- a/src/Autopilot/analogcomponent.hxx +++ b/src/Autopilot/analogcomponent.hxx @@ -91,9 +91,9 @@ protected: * @param prop_root Property root for all relative paths * @return true if the node was handled, false otherwise. */ - virtual bool configure( SGPropertyNode& cfg_node, + bool configure( SGPropertyNode& cfg_node, const std::string& cfg_name, - SGPropertyNode& prop_root ); + SGPropertyNode& prop_root ) override; /** * @brief clamp the given value if <min> and/or <max> inputs were given @@ -107,7 +107,7 @@ protected: * is disabled. Analog components feed back it's output value to the active input value if disabled and feedback-if-disabled is true */ - virtual void disabled( double dt ); + void disabled( double dt ) override; /** * @brief return the current double value of the output property diff --git a/src/Autopilot/component.hxx b/src/Autopilot/component.hxx index 4f3030976..80e1617be 100644 --- a/src/Autopilot/component.hxx +++ b/src/Autopilot/component.hxx @@ -20,12 +20,7 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // -#ifndef __COMPONENT_HXX -#define __COMPONENT_HXX 1 - -#ifdef HAVE_CONFIG_H -# include -#endif +#pragma once #include #include @@ -122,6 +117,5 @@ public: bool isPropertyEnabled(); }; -} +} // of namespace FGXMLAutopilot -#endif // COMPONENT_HXX diff --git a/src/Autopilot/digitalfilter.hxx b/src/Autopilot/digitalfilter.hxx index 7c923ba02..7be809497 100644 --- a/src/Autopilot/digitalfilter.hxx +++ b/src/Autopilot/digitalfilter.hxx @@ -20,12 +20,7 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // -#ifndef __DIGITALFILTER_HXX -#define __DIGITALFILTER_HXX 1 - -#ifdef HAVE_CONFIG_H -# include -#endif +#pragma once #include "analogcomponent.hxx" @@ -47,12 +42,12 @@ private: }; protected: - virtual bool configure( SGPropertyNode& cfg_node, + bool configure( SGPropertyNode& cfg_node, const std::string& cfg_name, - SGPropertyNode& prop_root ); - virtual void update( bool firstTime, double dt); + SGPropertyNode& prop_root ) override; + void update( bool firstTime, double dt) override; - InitializeTo _initializeTo; + InitializeTo _initializeTo = INITIALIZE_INPUT; public: DigitalFilter(); @@ -66,4 +61,4 @@ public: }; } // namespace FGXMLAutopilot -#endif + diff --git a/src/Autopilot/pidcontroller.hxx b/src/Autopilot/pidcontroller.hxx index 354928e2d..450b447ae 100644 --- a/src/Autopilot/pidcontroller.hxx +++ b/src/Autopilot/pidcontroller.hxx @@ -86,7 +86,7 @@ public: // Subsystem identification. static const char* staticSubsystemClassId() { return "pid-controller"; } - void update( bool firstTime, double dt ); + void update( bool firstTime, double dt ) override; }; }