[wpiutil] Remove bit.hpp; replace with C++23 bit (#8792)

#7492 didn't catch all the uses and #7973 patched out byteswap in
Sleipnir for some reason (despite having upgraded compilers already)?
This commit is contained in:
Gold856
2026-06-29 11:37:27 -04:00
committed by GitHub
parent 54b0239984
commit 852e0dfd8e
18 changed files with 776 additions and 836 deletions

View File

@@ -5,6 +5,7 @@
#include "WebSocketConnection.hpp"
#include <algorithm>
#include <bit>
#include <span>
#include "wpi/net/WebSocket.hpp"
@@ -124,8 +125,7 @@ void WebSocketConnection::SendPing(uint64_t time) {
WPI_DEBUG4(m_logger, "conn: sending ping {}", time);
auto buf = AllocBuf();
buf.len = 8;
wpi::util::support::endian::write64<wpi::util::endianness::native>(buf.base,
time);
wpi::util::support::endian::write64<std::endian::native>(buf.base, time);
m_ws.SendPing({buf}, [selfweak = weak_from_this()](auto bufs, auto err) {
if (auto self = selfweak.lock()) {
self->m_err = err;