mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-05 01:05:34 +08:00
Ref T709, style
This commit is contained in:
committed by
Mat Sutcliffe
parent
e62aa6fb2f
commit
e908593847
@@ -1321,7 +1321,7 @@ namespace BlackSimPlugin
|
||||
m_DBusConnection.disconnectFromBus(m_DBusConnection.name());
|
||||
return;
|
||||
}
|
||||
checkConnectionCommon();
|
||||
checkConnectionCommon(); // bus
|
||||
m_DBusConnection.disconnectFromBus(m_DBusConnection.name());
|
||||
}
|
||||
|
||||
@@ -1334,7 +1334,7 @@ namespace BlackSimPlugin
|
||||
m_DBusConnection.disconnectFromPeer(m_DBusConnection.name());
|
||||
return;
|
||||
}
|
||||
checkConnectionCommon();
|
||||
checkConnectionCommon(); // peer
|
||||
m_DBusConnection.disconnectFromPeer(m_DBusConnection.name());
|
||||
}
|
||||
|
||||
@@ -1344,11 +1344,11 @@ namespace BlackSimPlugin
|
||||
CXSwiftBusTrafficProxy traffic(m_DBusConnection);
|
||||
CXSwiftBusWeatherProxy weather(m_DBusConnection);
|
||||
|
||||
bool result = service.isValid() && traffic.isValid() && weather.isValid();
|
||||
if (! result) { return; }
|
||||
const bool result = service.isValid() && traffic.isValid() && weather.isValid();
|
||||
if (!result) { return; }
|
||||
|
||||
QString swiftVersion = CBuildConfig::getVersionString();
|
||||
QString xswiftbusVersion = service.getVersionNumber();
|
||||
const QString swiftVersion = CBuildConfig::getVersionString();
|
||||
const QString xswiftbusVersion = service.getVersionNumber();
|
||||
if (xswiftbusVersion.isEmpty())
|
||||
{
|
||||
CLogMessage(this).warning(u"Could not determine which version of XSwiftBus is running. Mismatched versions might cause instability.");
|
||||
@@ -1364,8 +1364,8 @@ namespace BlackSimPlugin
|
||||
return;
|
||||
}
|
||||
|
||||
MultiplayerAcquireInfo info = traffic.acquireMultiplayerPlanes();
|
||||
if (! info.hasAcquired)
|
||||
const MultiplayerAcquireInfo info = traffic.acquireMultiplayerPlanes();
|
||||
if (!info.hasAcquired)
|
||||
{
|
||||
CLogMessage(this).error(u"Connection to XSwiftBus successful, but could not acquire multiplayer planes. %1 has acquired them already. Disable %2 or remove it if not required and reload XSwiftBus.") << info.owner << info.owner;
|
||||
return;
|
||||
|
||||
@@ -822,8 +822,9 @@ namespace XSwiftBus
|
||||
|
||||
int CTraffic::getPlaneData(void *id, int dataType, void *io_data)
|
||||
{
|
||||
auto planeIt = m_planesById.find(id);
|
||||
assert(planeIt != m_planesById.end());
|
||||
const auto planeIt = m_planesById.find(id);
|
||||
// assert(planeIt != m_planesById.end());
|
||||
if (planeIt == m_planesById.end()) { return xpmpData_Unavailable; } // less drastic version
|
||||
Plane *plane = planeIt->second;
|
||||
if (!plane) { return xpmpData_Unavailable; }
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ namespace XSwiftBus
|
||||
CTraffic(ISettingsProvider *settingsProvider);
|
||||
|
||||
//! Destructor
|
||||
~CTraffic() override;
|
||||
virtual ~CTraffic() override;
|
||||
|
||||
//! DBus interface name
|
||||
static const std::string &InterfaceName()
|
||||
@@ -139,9 +139,9 @@ namespace XSwiftBus
|
||||
//! Camera
|
||||
struct DeltaCameraPosition
|
||||
{
|
||||
double dx = 0.0;
|
||||
double dy = 0.0;
|
||||
double dz = 0.0;
|
||||
double dx = 0.0;
|
||||
double dy = 0.0;
|
||||
double dz = 0.0;
|
||||
double headingDeg = 0.0;
|
||||
double pitchDeg = 0.0;
|
||||
bool isInitialized = false;
|
||||
@@ -241,7 +241,7 @@ namespace XSwiftBus
|
||||
static void planeLoaded(void *id, bool succeeded, void *self)
|
||||
{
|
||||
auto *traffic = static_cast<CTraffic *>(self);
|
||||
auto planeIt = traffic->m_planesById.find(id);
|
||||
auto planeIt = traffic->m_planesById.find(id);
|
||||
if (planeIt == traffic->m_planesById.end()) { return; }
|
||||
|
||||
if (succeeded) { traffic->emitPlaneAdded(planeIt->second->callsign); }
|
||||
|
||||
Reference in New Issue
Block a user