mirror of
https://github.com/allankoechke/raylib-cpp.git
synced 2026-11-30 10:59:00 +00:00
Add self reference check to copy assignment
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user