mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-12-03 23:10:46 +08:00
Fix clang-tidy warnings
This comes from PX4 CI.
This commit is contained in:
1 parent
13f092a30f
commit
ce6b10b99a
1 file changed
+2
-1
@@ -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;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user