We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f7786dd commit e5256e7Copy full SHA for e5256e7
1 file changed
csrc/fusion.cpp
@@ -327,9 +327,11 @@ Fusion::Fusion(Fusion&& other) : Fusion() {
327
// Copy Assignment -- shares the source's container
328
Fusion& Fusion::operator=(const Fusion& other) {
329
FUSER_PERF_SCOPE("Fusion copy assign");
330
- Fusion copy(other);
331
- clear();
332
- swap(*this, copy);
+ if (this != &other) {
+ Fusion copy(other);
+ clear();
333
+ swap(*this, copy);
334
+ }
335
return *this;
336
}
337
0 commit comments