mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-02 05:04:08 +08:00
Fix clang-tidy warnings
This comes from PX4 CI.
This commit is contained in:
parent
13f092a30f
commit
ce6b10b99a
@ -93,8 +93,9 @@ template<typename Integer>
|
||||
Integer wrap(Integer x, Integer low, Integer high) {
|
||||
const auto range = high - low;
|
||||
|
||||
if (x < low)
|
||||
if (x < low) {
|
||||
x += range * ((low - x) / range + 1);
|
||||
}
|
||||
|
||||
return low + (x - low) % range;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user