aboutsummaryrefslogtreecommitdiffstats
path: root/src/diagnostic/active-diagnostic-request.cpp
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2017-03-10 13:09:19 +0100
committerRomain Forlot <romain.forlot@iot.bzh>2017-03-16 17:10:40 +0100
commit94506d3985429d79f8521fca46ed7b9dc1eb4109 (patch)
tree176162d27e5b359ede621a5ed7ef1b71f51f881b /src/diagnostic/active-diagnostic-request.cpp
parentc67a16cdc749b79dab650b99cc2990448e9a7ac6 (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.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;
}