Fix: Reading doesn't update receiving object values
authorRomain Forlot <romain.forlot@iot.bzh>
Wed, 26 Apr 2017 16:23:10 +0000 (18:23 +0200)
committerRomain Forlot <romain.forlot@iot.bzh>
Wed, 26 Apr 2017 23:03:34 +0000 (01:03 +0200)
Wrong signature using const argument with the obj receiving the read

Change-Id: I0c5b8a3c974f0bd140823f8ce88aa2cbd451e543
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
CAN-binder/low-can-binding/utils/socketcan.cpp
CAN-binder/low-can-binding/utils/socketcan.hpp

index c550f6e..3385f0c 100644 (file)
@@ -138,7 +138,7 @@ namespace utils
                return socket_;
        }
 
-       socketcan_t& operator>>(socketcan_t& s, const can_message_t& cm)
+       socketcan_t& operator>>(socketcan_t& s, can_message_t& cm)
        {
                struct {
                        struct bcm_msg_head msg_head;
index 673303b..cc7326e 100644 (file)
@@ -78,5 +78,5 @@ namespace utils
        socketcan_t& operator<<(socketcan_t& s, const struct basic_bcm_msg<can_frame>& obj);
        socketcan_t& operator<<(socketcan_t& s, const struct canfd_bcm_msg& obj);
 
-       socketcan_t& operator>>(socketcan_t& s, const can_message_t& cm);
+       socketcan_t& operator>>(socketcan_t& s, can_message_t& cm);
 }