mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-21 17:13:35 +08:00
Partially removed all references to STL's algorithm. <algorithm> is not included anywhere, though still used in several places which still alows the code to compile as <algorithm> is being pulled in from some other standard headers.
This commit is contained in:
@@ -82,7 +82,7 @@ uint16_t IEEE754Converter::nativeNonIeeeToHalf(float value)
|
||||
hbits |= ((exp + 14) << 10);
|
||||
}
|
||||
const int32_t ival = static_cast<int32_t>(value);
|
||||
hbits |= static_cast<uint16_t>(std::abs(ival) & 0x3FFU);
|
||||
hbits |= static_cast<uint16_t>(((ival < 0) ? (-ival) : ival) & 0x3FFU);
|
||||
float diff = std::abs(value - static_cast<float>(ival));
|
||||
hbits += diff >= 0.5F;
|
||||
return hbits;
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
|
||||
#include <uavcan/protocol/node_status_monitor.hpp>
|
||||
#include <uavcan/debug.hpp>
|
||||
#include <algorithm>
|
||||
#include <cassert>
|
||||
#include <cstdlib>
|
||||
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
|
||||
#include <uavcan/transport/can_io.hpp>
|
||||
#include <uavcan/debug.hpp>
|
||||
#include <algorithm>
|
||||
#include <cassert>
|
||||
#include <limits>
|
||||
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
#include <uavcan/debug.hpp>
|
||||
#include <cstdlib>
|
||||
#include <cassert>
|
||||
#include <algorithm>
|
||||
|
||||
namespace uavcan
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user