summaryrefslogtreecommitdiff
path: root/samples
diff options
context:
space:
mode:
authorWouter van Oortmerssen <aardappel@gmail.com>2017-04-17 18:00:41 -0700
committerWouter van Oortmerssen <aardappel@gmail.com>2017-04-17 18:00:41 -0700
commit523f3833eb2ddd41e891c3ef8f3c5d4f154916b6 (patch)
tree2ef3e5c4ade6f01d01b8a9ea0ef865c7a173f976 /samples
parent46497e4f9ad2f8193dc12cad02d525f93c8f4fd0 (diff)
downloadflatbuffers-523f3833eb2ddd41e891c3ef8f3c5d4f154916b6.tar.gz
flatbuffers-523f3833eb2ddd41e891c3ef8f3c5d4f154916b6.tar.bz2
flatbuffers-523f3833eb2ddd41e891c3ef8f3c5d4f154916b6.zip
VS fix for ambiguous union assignment operator.
Change-Id: I1c37db1ced462fd558d3e893a501341f3eca6379
Diffstat (limited to 'samples')
-rw-r--r--samples/monster_generated.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/samples/monster_generated.h b/samples/monster_generated.h
index e1a1e7e1..fb261849 100644
--- a/samples/monster_generated.h
+++ b/samples/monster_generated.h
@@ -78,8 +78,8 @@ struct EquipmentUnion {
type(Equipment_NONE), value(nullptr)
{ std::swap(type, u.type); std::swap(value, u.value); }
EquipmentUnion(const EquipmentUnion &) FLATBUFFERS_NOEXCEPT;
- EquipmentUnion &operator=(EquipmentUnion u) FLATBUFFERS_NOEXCEPT
- { std::swap(type, u.type); std::swap(value, u.value); return *this; }
+ EquipmentUnion &operator=(const EquipmentUnion &u) FLATBUFFERS_NOEXCEPT
+ { EquipmentUnion t(u); std::swap(type, t.type); std::swap(value, t.value); return *this; }
EquipmentUnion &operator=(EquipmentUnion &&u) FLATBUFFERS_NOEXCEPT
{ std::swap(type, u.type); std::swap(value, u.value); return *this; }
~EquipmentUnion() { Reset(); }