mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-02 04:04:19 +00:00
Fixed DetachedBuffer self move assignment (#5521)
This commit is contained in:
committed by
Wouter van Oortmerssen
parent
2f5bb2eec4
commit
97f3aa9174
@@ -638,6 +638,9 @@ class DetachedBuffer {
|
||||
#if !defined(FLATBUFFERS_CPP98_STL)
|
||||
// clang-format on
|
||||
DetachedBuffer &operator=(DetachedBuffer &&other) {
|
||||
if (this == &other)
|
||||
return *this;
|
||||
|
||||
destroy();
|
||||
|
||||
allocator_ = other.allocator_;
|
||||
|
||||
Reference in New Issue
Block a user