refactor: pairing flow, pairing tests, and inline struct comments (#5602)

This commit is contained in:
Dave Lane authored and GitHub committed 2026-09-03 08:51:02 -04:00
1 parent 41c25716cb
commit aa92000dc6
15 files changed
+535 -218

No files matched your search

+1 -2
View File
@@ -1670,8 +1670,7 @@ namespace input {
*/
template<typename Packet>
bool validate_fixed_input_packet(std::span<const std::uint8_t> packet, std::uint32_t declared_size) {
constexpr auto expected_size = static_cast<std::uint32_t>(sizeof(Packet) - sizeof(std::uint32_t));
if (declared_size != expected_size) {
if (constexpr auto expected_size = static_cast<std::uint32_t>(sizeof(Packet) - sizeof(std::uint32_t)); declared_size != expected_size) {
return false;
}
return packet.size() >= sizeof(Packet);