Skip to content

Commit

Permalink
ScopedAssignment: move assignment operator
Browse files Browse the repository at this point in the history
  • Loading branch information
chaosink authored and mmp committed Nov 10, 2018
1 parent ebf0648 commit b856f41
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/integrators/bdpt.h
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ class ScopedAssignment {
ScopedAssignment(const ScopedAssignment &) = delete;
ScopedAssignment &operator=(const ScopedAssignment &) = delete;
ScopedAssignment &operator=(ScopedAssignment &&other) {
if (target) *target = backup;
target = other.target;
backup = other.backup;
other.target = nullptr;
Expand Down

0 comments on commit b856f41

Please sign in to comment.