diff options
author | Romain Forlot <romain.forlot@iot.bzh> | 2017-03-10 13:09:19 +0100 |
---|---|---|
committer | Romain Forlot <romain.forlot@iot.bzh> | 2017-03-16 17:10:40 +0100 |
commit | 94506d3985429d79f8521fca46ed7b9dc1eb4109 (patch) | |
tree | 176162d27e5b359ede621a5ed7ef1b71f51f881b /src/diagnostic/active-diagnostic-request.cpp | |
parent | c67a16cdc749b79dab650b99cc2990448e9a7ac6 (diff) |
Keep raw pointer for now as we have to move them around vector.
Change-Id: I8a518540b54552d60c6fd1054a0fc41dda5400b4
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'src/diagnostic/active-diagnostic-request.cpp')
-rw-r--r-- | src/diagnostic/active-diagnostic-request.cpp | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/src/diagnostic/active-diagnostic-request.cpp b/src/diagnostic/active-diagnostic-request.cpp index 3e6ab14..baa1184 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; } |