diff --git a/src/xswiftbus/dbusobject.h b/src/xswiftbus/dbusobject.h index c35fa9aaf..299f49c3d 100644 --- a/src/xswiftbus/dbusobject.h +++ b/src/xswiftbus/dbusobject.h @@ -92,7 +92,6 @@ namespace XSwiftBus const DBusObjectPathVTable m_dbusObjectPathVTable = { dbusObjectPathUnregisterFunction, dbusObjectPathMessageFunction, nullptr, nullptr, nullptr, nullptr }; }; - -} +} // ns #endif // guard diff --git a/src/xswiftbus/main.cpp b/src/xswiftbus/main.cpp index ab90331d1..00a39b115 100644 --- a/src/xswiftbus/main.cpp +++ b/src/xswiftbus/main.cpp @@ -10,9 +10,7 @@ #define NOMINMAX #endif #include "plugin.h" -#include "utils.h" #include "traffic.h" -#include "service.h" #include #include #include @@ -21,7 +19,7 @@ #define XPLM_MSG_LIVERY_LOADED 108 #endif -XSwiftBus::CPlugin *g_plugin; +static XSwiftBus::CPlugin *g_plugin = nullptr; PLUGIN_API int XPluginStart(char *o_name, char *o_sig, char *o_desc) { @@ -31,7 +29,7 @@ PLUGIN_API int XPluginStart(char *o_name, char *o_sig, char *o_desc) #endif std::strcpy(o_name, "XSwiftBus"); - std::strcpy(o_sig, "org.swift-project.xswiftbus"); + std::strcpy(o_sig, "org.swift-project.xswiftbus"); std::strcpy(o_desc, "Allows swift to connect to X-Plane via D-Bus IPC"); XSwiftBus::CTraffic::initLegacyData(); @@ -40,6 +38,7 @@ PLUGIN_API int XPluginStart(char *o_name, char *o_sig, char *o_desc) PLUGIN_API void XPluginStop() { + // void } PLUGIN_API int XPluginEnable() diff --git a/src/xswiftbus/plugin.h b/src/xswiftbus/plugin.h index c19bc7aba..0a24095a3 100644 --- a/src/xswiftbus/plugin.h +++ b/src/xswiftbus/plugin.h @@ -89,6 +89,6 @@ namespace XSwiftBus static float startServerDeferred(float, float, int, void *refcon); static float flightLoopCallback(float, float, int, void *refcon); }; -} +} // ns #endif // guard diff --git a/src/xswiftbus/service.h b/src/xswiftbus/service.h index 061077f58..0a0277404 100644 --- a/src/xswiftbus/service.h +++ b/src/xswiftbus/service.h @@ -41,7 +41,7 @@ namespace XSwiftBus CService(CSettings *staticSettings); //! Destructor - ~CService() override = default; + virtual ~CService() override = default; //! DBus interface name static const std::string &InterfaceName() diff --git a/src/xswiftbus/traffic.h b/src/xswiftbus/traffic.h index 37aee918a..026e3a2fc 100644 --- a/src/xswiftbus/traffic.h +++ b/src/xswiftbus/traffic.h @@ -146,7 +146,7 @@ namespace XSwiftBus static CSettings *s_pluginSettings; //!< needs to be static for static functions - bool m_initialized = false; + bool m_initialized = false; bool m_enabledMultiplayer = false; CTerrainProbe m_terrainProbe; @@ -164,6 +164,7 @@ namespace XSwiftBus static int drawCallback(XPLMDrawingPhase phase, int isBefore, void *refcon); static int spaceKeySniffer(char character, XPLMKeyFlags flags, char virtualKey, void *refcon); + //! Remote aircraft struct Plane { void *id = nullptr; diff --git a/src/xswiftbus/weather.cpp b/src/xswiftbus/weather.cpp index 70a201afd..9ae9d2162 100644 --- a/src/xswiftbus/weather.cpp +++ b/src/xswiftbus/weather.cpp @@ -64,7 +64,7 @@ namespace XSwiftBus } } - const char *introspection_weather = + static const char *introspection_weather = DBUS_INTROSPECT_1_0_XML_DOCTYPE_DECL_NODE #include "org.swift_project.xswiftbus.weather.xml" ;