summaryrefslogtreecommitdiffstats
path: root/src/diagnostic/active-diagnostic-request.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/diagnostic/active-diagnostic-request.cpp')
-rw-r--r--src/diagnostic/active-diagnostic-request.cpp27
1 files changed, 15 insertions, 12 deletions
diff --git a/src/diagnostic/active-diagnostic-request.cpp b/src/diagnostic/active-diagnostic-request.cpp
index 3e6ab140..baa11844 100644
--- a/src/diagnostic/active-diagnostic-request.cpp
+++ b/src/diagnostic/active-diagnostic-request.cpp
@@ -24,18 +24,21 @@ bool active_diagnostic_request_t::operator==(const active_diagnostic_request_t&
active_diagnostic_request_t& active_diagnostic_request_t::operator=(const active_diagnostic_request_t& adr)
{
- bus_ = adr.bus_;
- id_ = adr.id_;
- handle_ = adr.handle_;
- name_ = adr.name_;
- decoder_ = adr.decoder_;
- callback_ = adr.callback_;
- recurring_ = adr.recurring_;
- wait_for_multiple_responses_ = adr.wait_for_multiple_responses_;
- in_flight_ = adr.in_flight_;
- frequency_clock_ = adr.frequency_clock_;
- timeout_clock_ = adr.timeout_clock_;
-
+ if (this != &adr)
+ {
+ bus_ = adr.bus_;
+ id_ = adr.id_;
+ handle_ = adr.handle_;
+ name_ = adr.name_;
+ decoder_ = adr.decoder_;
+ callback_ = adr.callback_;
+ recurring_ = adr.recurring_;
+ wait_for_multiple_responses_ = adr.wait_for_multiple_responses_;
+ in_flight_ = adr.in_flight_;
+ frequency_clock_ = adr.frequency_clock_;
+ timeout_clock_ = adr.timeout_clock_;
+ }
+
return *this;
}