diff options
author | Karsten Heimrich <karsten.heimrich@qt.io> | 2021-09-21 08:38:34 +0200 |
---|---|---|
committer | Karsten Heimrich <karsten.heimrich@qt.io> | 2021-09-21 21:38:34 +0200 |
commit | b7739fabdbbbeaaf0ee714be1ac3a464e389950c (patch) | |
tree | 8875ccf5cd0e87d4b16338d7964fe9b50aacfa28 | |
parent | cb313a6d5cd723979875240fb5678613fb1b4023 (diff) |
Clang tidy fix unconventional operator implementation
* The return type must be Class&.
Change-Id: I7db08346788b0aba3a858a76d40f2524fafef298
Reviewed-by: André Hartmann <aha_1980@gmx.de>
-rw-r--r-- | src/serialbus/qmodbuscommevent_p.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/serialbus/qmodbuscommevent_p.h b/src/serialbus/qmodbuscommevent_p.h index f0ae5a5..094ba11 100644 --- a/src/serialbus/qmodbuscommevent_p.h +++ b/src/serialbus/qmodbuscommevent_p.h @@ -89,15 +89,15 @@ public: return static_cast<QModbusCommEvent::EventByte> (m_eventByte); } - inline QModbusCommEvent operator=(QModbusCommEvent::EventByte byte) { + inline QModbusCommEvent &operator=(QModbusCommEvent::EventByte byte) { m_eventByte = byte; return *this; } - inline QModbusCommEvent operator|=(QModbusCommEvent::SendFlag sf) { + inline QModbusCommEvent &operator|=(QModbusCommEvent::SendFlag sf) { m_eventByte |= quint8(sf); return *this; } - inline QModbusCommEvent operator|=(QModbusCommEvent::ReceiveFlag rf) { + inline QModbusCommEvent &operator|=(QModbusCommEvent::ReceiveFlag rf) { m_eventByte |= quint8(rf); return *this; } |