From c657ee35586c09e725c4a2b944a22c26b1295eb0 Mon Sep 17 00:00:00 2001 From: Jared Boone Date: Tue, 1 Dec 2015 15:45:59 -0800 Subject: [PATCH] Clean up handling of bool -> int. C++ standard says false -> 0, true -> 1. --- firmware/application/ui_receiver.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/firmware/application/ui_receiver.cpp b/firmware/application/ui_receiver.cpp index ef746b3e9..fccae3420 100644 --- a/firmware/application/ui_receiver.cpp +++ b/firmware/application/ui_receiver.cpp @@ -547,8 +547,8 @@ static FIL fil_tpms; class ManchesterDecoder { public: struct DecodedSymbol { - bool value; - bool error; + uint_fast8_t value; + uint_fast8_t error; }; constexpr ManchesterDecoder( @@ -601,10 +601,10 @@ static ManchesterFormatted format_manchester( const auto symbol = decoder[i]; data <<= 1; - data |= symbol.value ? 1 : 0; + data |= symbol.value; error <<= 1; - error |= symbol.error ? 1 : 0; + error |= symbol.error; if( (i & 7) == 7 ) { hex_data += to_string_hex(data & 0xff, 2);