From 41f81247ce6d901d6f41ddf16bf031c2e7cb0922 Mon Sep 17 00:00:00 2001 From: BlackMark Date: Sun, 12 Apr 2020 15:07:58 +0200 Subject: [PATCH] Improve semantics for chip erase state enum --- stk500v2/main.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/stk500v2/main.cpp b/stk500v2/main.cpp index 77fbeec..57d1a6c 100644 --- a/stk500v2/main.cpp +++ b/stk500v2/main.cpp @@ -506,10 +506,10 @@ static inline void formatErrorAnswer(Message &msg) } enum class ChipEraseState { - NONE = 0b00, - REQUEST = 0b01, - RESPONSE = 0b10, - PERFORM = 0b11, + NONE = 0, + REQUEST = (1 << 1), + RESPONSE = (1 << 2), + PERFORM = REQUEST | RESPONSE, }; constexpr ChipEraseState operator|(const ChipEraseState &self, const ChipEraseState &other)