Skip to content

Commit

Permalink
Switch away from C-style enum constructs (#1589)
Browse files Browse the repository at this point in the history
  • Loading branch information
Anirban166 authored Jul 25, 2022
1 parent 80d0dff commit 5edd51b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Os/Queue.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ namespace Os {
class Queue {
public:

typedef enum {
enum QueueStatus {
QUEUE_OK, //!< message sent/received okay
QUEUE_NO_MORE_MSGS, //!< If non-blocking, all the messages have been drained.
QUEUE_UNINITIALIZED, //!< Queue wasn't initialized successfully
Expand All @@ -35,12 +35,12 @@ namespace Os {
QUEUE_EMPTY_BUFFER, //!< supplied buffer is empty
QUEUE_FULL, //!< queue was full when attempting to send a message
QUEUE_UNKNOWN_ERROR //!< Unexpected error; can't match with returns
} QueueStatus;
};

typedef enum {
enum QueueBlocking {
QUEUE_BLOCKING, //!< Queue receive blocks until a message arrives
QUEUE_NONBLOCKING //!< Queue receive always returns even if there is no message
} QueueBlocking;
};

Queue();
virtual ~Queue();
Expand Down

0 comments on commit 5edd51b

Please sign in to comment.