mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-20 00:51:42 +00:00
[wpiutil] Upgrade to LLVM 17.0.1 (#5482)
This commit is contained in:
@@ -73,7 +73,7 @@ std::optional<uint64_t> WireDecoder3::SimpleValueReader::Read64(
|
||||
std::optional<double> WireDecoder3::SimpleValueReader::ReadDouble(
|
||||
std::span<const uint8_t>* in) {
|
||||
if (auto val = Read64(in)) {
|
||||
return wpi::BitsToDouble(val.value());
|
||||
return wpi::bit_cast<double>(val.value());
|
||||
} else {
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ static void Write32(wpi::raw_ostream& os, uint32_t val) {
|
||||
|
||||
static void WriteDouble(wpi::raw_ostream& os, double val) {
|
||||
// The highest performance way to do this, albeit non-portable.
|
||||
uint64_t v = wpi::DoubleToBits(val);
|
||||
uint64_t v = wpi::bit_cast<uint64_t>(val);
|
||||
os << std::span<const uint8_t>{{static_cast<uint8_t>((v >> 56) & 0xff),
|
||||
static_cast<uint8_t>((v >> 48) & 0xff),
|
||||
static_cast<uint8_t>((v >> 40) & 0xff),
|
||||
|
||||
Reference in New Issue
Block a user