mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-23 05:43:34 +08:00
clang-tidy readability-simplify-boolean-expr
This commit is contained in:
@@ -54,12 +54,7 @@ TerrainEstimator::TerrainEstimator() :
|
||||
|
||||
bool TerrainEstimator::is_distance_valid(float distance)
|
||||
{
|
||||
if (distance > 40.0f || distance < 0.00001f) {
|
||||
return false;
|
||||
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
return (distance < 40.0f && distance > 0.00001f);
|
||||
}
|
||||
|
||||
void TerrainEstimator::predict(float dt, const struct vehicle_attitude_s *attitude,
|
||||
|
||||
Reference in New Issue
Block a user