mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-05 09:09:04 +08:00
fix: add self-assign check in operator=
Related-To: NEO-9038 Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
16d94a0b8c
commit
9337911742
@@ -518,6 +518,9 @@ struct RequestProperty {
|
||||
}
|
||||
}
|
||||
RequestProperty &operator=(const RequestProperty &other) {
|
||||
if (this == &other) {
|
||||
return *this;
|
||||
}
|
||||
requestId = other.requestId;
|
||||
commandId = other.commandId;
|
||||
componentId = other.componentId;
|
||||
@@ -561,6 +564,9 @@ struct ResponseProperty {
|
||||
}
|
||||
}
|
||||
ResponseProperty &operator=(const ResponseProperty &other) {
|
||||
if (this == &other) {
|
||||
return *this;
|
||||
}
|
||||
this->requestId = other.requestId;
|
||||
this->returnCode = other.returnCode;
|
||||
this->componentId = other.componentId;
|
||||
|
||||
Reference in New Issue
Block a user