diff --git a/canbus.cpp b/canbus.cpp index c01f274..91e83ad 100644 --- a/canbus.cpp +++ b/canbus.cpp @@ -17,7 +17,7 @@ CANBus::CANBus(const CANBus& pBus) : active(pBus.active) {} -bool CANBus::operator==(CANBus& bus) { +bool CANBus::operator==(const CANBus& bus) const{ return speed == bus.speed && listenOnly == bus.listenOnly && singleWire == bus.singleWire && diff --git a/canbus.h b/canbus.h index c8b4e88..8dd8044 100644 --- a/canbus.h +++ b/canbus.h @@ -7,7 +7,7 @@ class CANBus public: CANBus(); CANBus(const CANBus&); - bool operator==(CANBus&); + bool operator==(const CANBus&) const; virtual ~CANBus(){}; /*TODO: remove connection from CANBus and add CANBus as an element of CANConnection */ int speed; bool listenOnly;