Skip to content

Commit 418739c

Browse files
addaleaxtargos
authored andcommitted
src: fix MallocedBuffer move assignment operator
PR-URL: #20883 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de>
1 parent 82afb4c commit 418739c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/util.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,7 @@ struct MallocedBuffer {
438438
}
439439
MallocedBuffer& operator=(MallocedBuffer&& other) {
440440
this->~MallocedBuffer();
441-
return *new(this) MallocedBuffer(other);
441+
return *new(this) MallocedBuffer(std::move(other));
442442
}
443443
~MallocedBuffer() {
444444
free(data);

0 commit comments

Comments
 (0)