Fix move ResizeableObject move constructor
It wasn't handling non-owned allocators correctly, which messed up using
the move constructor on aos StaticBuilders.
Change-Id: Ie751fd0a0c76db723b375aaec310de66b08a55b1
Signed-off-by: James Kuszmaul <james.kuszmaul@bluerivertech.com>
diff --git a/aos/flatbuffers/base.h b/aos/flatbuffers/base.h
index f99dbb8..387dbc3 100644
--- a/aos/flatbuffers/base.h
+++ b/aos/flatbuffers/base.h
@@ -99,13 +99,7 @@
// Users do not end up using the move constructor; however, it is needed to
// handle the fact that a ResizeableObject may be a member of an std::vector
// in the various generated types.
- ResizeableObject(ResizeableObject &&other)
- : buffer_(other.buffer_),
- owned_allocator_(std::move(other.owned_allocator_)),
- allocator_(owned_allocator_.get()) {
- other.buffer_ = {};
- other.allocator_ = nullptr;
- }
+ ResizeableObject(ResizeableObject &&other);
// Required alignment of this object.
virtual size_t Alignment() const = 0;
// Offset from the start of buffer() to the actual start of the object in