Add self reference check to copy assignment

This commit is contained in:
Mafciejewicz
2021-09-10 17:49:01 +02:00
parent cf5961e165
commit 4d3e564716

View File

@@ -71,8 +71,14 @@ class Wave : public ::Wave {
}
Wave& operator=(const Wave& other) {
if (&other != this) {
return *this;
}
Unload();
set(other.Copy());
return *this;
};
Wave& operator=(Wave&& other) {