Skip to content

Commit

Permalink
Update MessageType.h
Browse files Browse the repository at this point in the history
  • Loading branch information
peterus authored Sep 13, 2024
1 parent dc3b317 commit 809fe3e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/MessageType.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
namespace aprs {
class MessageType {
public:
enum Value : uint8_t
{
enum Value : uint8_t {
PositionWithoutTimestamp, // = and !
// PositionWithTimestamp, // @ and /
// Status, // >
Expand Down Expand Up @@ -56,12 +55,15 @@ class MessageType {
// cppcheck-suppress noExplicitConstructor
constexpr MessageType(Value aType) : _value(aType) {
}

constexpr bool operator==(MessageType a) const {
return _value == a._value;
}

constexpr bool operator!=(MessageType a) const {
return _value != a._value;
}

explicit operator bool() const {
return _value != Error;
}
Expand Down

0 comments on commit 809fe3e

Please sign in to comment.