Un-const Message in message handler interfaces.

I want to modify in place the messages that are received. Naughty, but oh well.
This commit is contained in:
Jared Boone 2015-09-26 11:48:30 -07:00
parent 5469a3a31d
commit 31ff13f1c0
5 changed files with 8 additions and 8 deletions

View file

@ -47,8 +47,8 @@ public:
return push(&message, sizeof(message));
}
const Message* pop(std::array<uint8_t, Message::MAX_SIZE>& buf) {
const Message* const p = reinterpret_cast<Message*>(buf.data());
Message* pop(std::array<uint8_t, Message::MAX_SIZE>& buf) {
Message* const p = reinterpret_cast<Message*>(buf.data());
return fifo.out_r(buf.data(), buf.size()) ? p : nullptr;
}