[XSwiftBus] Misc. style fixes

This commit is contained in:
Klaus Basan
2020-03-18 23:10:59 +01:00
committed by Mat Sutcliffe
parent db81acf574
commit 80e97f749f
5 changed files with 22 additions and 22 deletions

View File

@@ -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

View File

@@ -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);

View File

@@ -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;