Skip to content

Commit

Permalink
src: fix MallocedBuffer move assignment operator
Browse files Browse the repository at this point in the history
PR-URL: #20883
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
  • Loading branch information
addaleax authored and BridgeAR committed May 25, 2018
1 parent 8495452 commit cfc9d04
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/util.h
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ struct MallocedBuffer {
}
MallocedBuffer& operator=(MallocedBuffer&& other) {
this->~MallocedBuffer();
return *new(this) MallocedBuffer(other);
return *new(this) MallocedBuffer(std::move(other));
}
~MallocedBuffer() {
free(data);
Expand Down

0 comments on commit cfc9d04

Please sign in to comment.