mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-31 04:25:35 +08:00
Ref T709, style
This commit is contained in:
committed by
Mat Sutcliffe
parent
e62aa6fb2f
commit
e908593847
@@ -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