diff options
-rw-r--r-- | src/serialbus/qcanbusdevice.cpp | 10 | ||||
-rw-r--r-- | src/serialbus/qcanbusdevice.h | 10 |
2 files changed, 11 insertions, 9 deletions
diff --git a/src/serialbus/qcanbusdevice.cpp b/src/serialbus/qcanbusdevice.cpp index 8eb45c1..222f19c 100644 --- a/src/serialbus/qcanbusdevice.cpp +++ b/src/serialbus/qcanbusdevice.cpp @@ -150,16 +150,18 @@ Q_LOGGING_CATEGORY(QT_CANBUS, "qt.canbus") */ /*! - \fn QCanBusDevice::Filter::operator==(const Filter &other) + \fn bool operator==(const QCanBusDevice::Filter &a, const QCanBusDevice::Filter &b) + \relates QCanBusDevice::Filter - Returns true, if the filter \a other is equal to this filter, + Returns true, if the filter \a a is equal to the filter \a b, otherwise returns false. */ /*! - \fn QCanBusDevice::Filter::operator!=(const Filter &other) + \fn bool operator!=(const QCanBusDevice::Filter &a, const QCanBusDevice::Filter &b) + \relates QCanBusDevice::Filter - Returns true, if the filter \a other is not equal to this filter, + Returns true, if the filter \a a is not equal to the filter \a b, otherwise returns false. */ diff --git a/src/serialbus/qcanbusdevice.h b/src/serialbus/qcanbusdevice.h index 9b505f9..5d2d976 100644 --- a/src/serialbus/qcanbusdevice.h +++ b/src/serialbus/qcanbusdevice.h @@ -98,15 +98,15 @@ public: struct Filter { - bool operator==(const Filter &other) const + friend constexpr bool operator==(const Filter &a, const Filter &b) noexcept { - return frameId == other.frameId && frameIdMask == other.frameIdMask - && type == other.type && format == other.format; + return a.frameId == b.frameId && a.frameIdMask == b.frameIdMask + && a.type == b.type && a.format == b.format; } - bool operator!=(const Filter &other) const + friend constexpr bool operator!=(const Filter &a, const Filter &b) noexcept { - return !operator==(other); + return !operator==(a, b); } enum FormatFilter { |