mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
31 lines
970 B
Diff
31 lines
970 B
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Tyler Veness <calcmogul@gmail.com>
|
|
Date: Tue, 28 Jan 2025 22:19:14 -0800
|
|
Subject: [PATCH 3/9] Use wpi::byteswap()
|
|
|
|
---
|
|
include/sleipnir/util/spy.hpp | 3 ++-
|
|
1 file changed, 2 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/include/sleipnir/util/spy.hpp b/include/sleipnir/util/spy.hpp
|
|
index bf0925e282adffa933d2bc3be8b7441fc4d855d3..49dc97ccea736c51e08b752f863661df54171303 100644
|
|
--- a/include/sleipnir/util/spy.hpp
|
|
+++ b/include/sleipnir/util/spy.hpp
|
|
@@ -12,6 +12,7 @@
|
|
#include <string_view>
|
|
|
|
#include <Eigen/SparseCore>
|
|
+#include <wpi/util/bit.hpp>
|
|
|
|
namespace slp {
|
|
|
|
@@ -106,7 +107,7 @@ class Spy {
|
|
/// @param num A 32-bit signed integer.
|
|
void write32le(int32_t num) {
|
|
if constexpr (std::endian::native != std::endian::little) {
|
|
- num = std::byteswap(num);
|
|
+ num = wpi::util::byteswap(num);
|
|
}
|
|
m_file.write(reinterpret_cast<char*>(&num), sizeof(num));
|
|
}
|