Changed C++ wrapper to not require non-const access to the buffer when sending
@@ -68,12 +68,12 @@ class State {
return sbp_process(&state_, &read_func);
}
- s8 send_message(u16 msg_type, u16 sender_id, u8 length, u8 payload[]) {
- return sbp_send_message(&state_, msg_type, sender_id, length, payload, &write_func);
+ s8 send_message(u16 msg_type, u16 sender_id, u8 length, const u8 payload[]) {
+ return sbp_send_message(&state_, msg_type, sender_id, length, const_cast<u8 *>(payload), &write_func);
}
- s8 process_payload(u16 sender_id, u16 msg_type, u8 msg_length, u8 payload[]) {
- return sbp_process_payload(&state_, sender_id, msg_type, msg_length, payload);
+ s8 process_payload(u16 sender_id, u16 msg_type, u8 msg_length, const u8 payload[]) {
+ return sbp_process_payload(&state_, sender_id, msg_type, msg_length, const_cast<u8 *>(payload));
}
};
