Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[wpiutil] Struct: Remove explicit span length from int8 #6840

Merged
merged 2 commits into from
Jul 16, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions wpiutil/src/main/native/include/wpi/struct/Struct.h
Original file line number Diff line number Diff line change
Expand Up @@ -478,8 +478,8 @@ struct Struct<int8_t> {
static constexpr std::string_view GetTypeString() { return "struct:int8"; }
static constexpr size_t GetSize() { return 1; }
static constexpr std::string_view GetSchema() { return "int8 value"; }
static int8_t Unpack(std::span<const uint8_t, 1> data) { return data[0]; }
static void Pack(std::span<uint8_t, 1> data, int8_t value) {
static int8_t Unpack(std::span<const uint8_t> data) { return data[0]; }
static void Pack(std::span<uint8_t> data, int8_t value) {
data[0] = value;
}
};
Expand Down
Loading