From d173e26f9aa7a9c475193f73e5bea051625a4af5 Mon Sep 17 00:00:00 2001 From: canpadawan Date: Fri, 24 Jun 2016 17:28:30 +0200 Subject: [PATCH] == operator is now const --- canbus.cpp | 2 +- canbus.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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;