mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-26 02:35:38 +08:00
[XSwiftBus] Misc. style fixes
This commit is contained in:
committed by
Mat Sutcliffe
parent
db81acf574
commit
80e97f749f
@@ -135,7 +135,6 @@ namespace XSwiftBus
|
|||||||
case DBusSession: return "Session";
|
case DBusSession: return "Session";
|
||||||
case DBusP2P: return "P2P";
|
case DBusP2P: return "P2P";
|
||||||
}
|
}
|
||||||
|
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
} // ns
|
} // ns
|
||||||
|
|||||||
@@ -62,6 +62,7 @@ namespace XSwiftBus
|
|||||||
bool parseDBusPort (const std::string &value);
|
bool parseDBusPort (const std::string &value);
|
||||||
bool parseDebug (const std::string &value);
|
bool parseDebug (const std::string &value);
|
||||||
bool parseTcas (const std::string &value);
|
bool parseTcas (const std::string &value);
|
||||||
|
bool writeConfigFile () const;
|
||||||
|
|
||||||
static std::string dbusModeToString(DBusMode mode);
|
static std::string dbusModeToString(DBusMode mode);
|
||||||
|
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ namespace XSwiftBus
|
|||||||
|
|
||||||
std::tuple<float, float, float, float> getFrameStats()
|
std::tuple<float, float, float, float> getFrameStats()
|
||||||
{
|
{
|
||||||
if (m_total == 0) { return {}; }
|
if (m_total < 0.001f) { return {}; } // no DIV by 0
|
||||||
const float fps = m_samples.size() / m_total;
|
const float fps = m_samples.size() / m_total;
|
||||||
const float ratio = 1 - m_totalOverBudget / m_total;
|
const float ratio = 1 - m_totalOverBudget / m_total;
|
||||||
const float miles = m_totalMetersShort / 1852.0f;
|
const float miles = m_totalMetersShort / 1852.0f;
|
||||||
|
|||||||
Reference in New Issue
Block a user