clang-tidy readability-simplify-boolean-expr

This commit is contained in:
Daniel Agar
2017-06-02 19:35:18 -04:00
parent 3c06641897
commit 64ed96d81a
12 changed files with 36 additions and 95 deletions
+10 -14
View File
@@ -532,20 +532,16 @@ void Ekf2Replay::writeMessage(int &fd, void *data, size_t size)
bool Ekf2Replay::needToSaveMessage(uint8_t type)
{
if (type == LOG_ATT_MSG ||
type == LOG_LPOS_MSG ||
type == LOG_EST0_MSG ||
type == LOG_EST1_MSG ||
type == LOG_EST2_MSG ||
type == LOG_EST3_MSG ||
type == LOG_EST4_MSG ||
type == LOG_EST5_MSG ||
type == LOG_EST6_MSG ||
type == LOG_CTS_MSG) {
return false;
}
return true;
return !(type == LOG_ATT_MSG ||
type == LOG_LPOS_MSG ||
type == LOG_EST0_MSG ||
type == LOG_EST1_MSG ||
type == LOG_EST2_MSG ||
type == LOG_EST3_MSG ||
type == LOG_EST4_MSG ||
type == LOG_EST5_MSG ||
type == LOG_EST6_MSG ||
type == LOG_CTS_MSG);
}
// update all estimator topics and write them to log file