mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-09 14:46:26 +00:00
Fixed move constructor in generated union class (#4192)
* Fixed move constructor in generated union class * Removed delegating constructor
This commit is contained in:
committed by
Wouter van Oortmerssen
parent
695d26183a
commit
17c5f89d4f
@@ -75,7 +75,8 @@ struct EquipmentUnion {
|
||||
|
||||
EquipmentUnion() : type(Equipment_NONE), table(nullptr) {}
|
||||
EquipmentUnion(EquipmentUnion&& u):
|
||||
type(std::move(u.type)), table(std::move(u.table)) {}
|
||||
type(Equipment_NONE), table(nullptr)
|
||||
{ std::swap(type, u.type); std::swap(table, u.table); }
|
||||
EquipmentUnion(const EquipmentUnion &);
|
||||
EquipmentUnion &operator=(const EquipmentUnion &);
|
||||
~EquipmentUnion() { Reset(); }
|
||||
|
||||
Reference in New Issue
Block a user