Skip to content

Commit 4624cef

Browse files
committed
Move operator should not unload this if == other
1 parent a4584a8 commit 4624cef

File tree

6 files changed

+6
-6
lines changed

6 files changed

+6
-6
lines changed

include/Material.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ class Material : public ::Material {
6060
Material& operator=(const Material&) = delete;
6161

6262
Material& operator=(Material&& other) {
63-
if (this != &other) {
63+
if (this == &other) {
6464
return *this;
6565
}
6666

include/Mesh.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ class Mesh : public ::Mesh {
162162
Mesh& operator=(const Mesh&) = delete;
163163

164164
Mesh& operator=(Mesh&& other) {
165-
if (this != &other) {
165+
if (this == &other) {
166166
return *this;
167167
}
168168

include/Model.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ class Model : public ::Model {
6666
Model& operator=(const Model&) = delete;
6767

6868
Model& operator=(Model&& other) {
69-
if (this != &other) {
69+
if (this == &other) {
7070
return *this;
7171
}
7272

include/ModelAnimation.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ class ModelAnimation : public ::ModelAnimation {
5959
ModelAnimation& operator=(const ModelAnimation&) = delete;
6060

6161
ModelAnimation& operator=(ModelAnimation&& other) {
62-
if (this != &other) {
62+
if (this == &other) {
6363
return *this;
6464
}
6565

include/Shader.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ class Shader : public ::Shader {
6565
Shader& operator=(const Shader&) = delete;
6666

6767
Shader& operator=(Shader&& other) {
68-
if (this != &other) {
68+
if (this == &other) {
6969
return *this;
7070
}
7171

include/Wave.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ class Wave : public ::Wave {
7777
}
7878

7979
Wave& operator=(const Wave& other) {
80-
if (&other != this) {
80+
if (this == &other) {
8181
return *this;
8282
}
8383

0 commit comments

Comments
 (0)