[ox/model] Fix ModelUnion to copy type on copy and move

This commit is contained in:
Gary Talent 2023-02-07 23:19:18 -06:00
parent 8077aaf0ae
commit dba31d2cd9

View File

@ -532,12 +532,14 @@ class ModelUnion {
m_fields[field->name] = field.get(); m_fields[field->name] = field.get();
++i; ++i;
} }
m_type = other.m_type;
m_unionIdx = other.m_unionIdx; m_unionIdx = other.m_unionIdx;
} }
constexpr ModelUnion(ModelUnion &&other) noexcept { constexpr ModelUnion(ModelUnion &&other) noexcept {
m_fieldsOrder = std::move(other.m_fieldsOrder); m_fieldsOrder = std::move(other.m_fieldsOrder);
m_fields = std::move(other.m_fields); m_fields = std::move(other.m_fields);
m_type = other.m_type;
m_unionIdx = other.m_unionIdx; m_unionIdx = other.m_unionIdx;
} }