== operator is now const
This commit is contained in:
+1
-1
@@ -17,7 +17,7 @@ CANBus::CANBus(const CANBus& pBus) :
|
|||||||
active(pBus.active) {}
|
active(pBus.active) {}
|
||||||
|
|
||||||
|
|
||||||
bool CANBus::operator==(CANBus& bus) {
|
bool CANBus::operator==(const CANBus& bus) const{
|
||||||
return speed == bus.speed &&
|
return speed == bus.speed &&
|
||||||
listenOnly == bus.listenOnly &&
|
listenOnly == bus.listenOnly &&
|
||||||
singleWire == bus.singleWire &&
|
singleWire == bus.singleWire &&
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ class CANBus
|
|||||||
public:
|
public:
|
||||||
CANBus();
|
CANBus();
|
||||||
CANBus(const 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 */
|
virtual ~CANBus(){}; /*TODO: remove connection from CANBus and add CANBus as an element of CANConnection */
|
||||||
int speed;
|
int speed;
|
||||||
bool listenOnly;
|
bool listenOnly;
|
||||||
|
|||||||
Reference in New Issue
Block a user