Bug 931571, part 14 - Delete various ways to copy or move nsDiscriminatedUnion. r=froydnj

nsDiscriminatedUnion owns memory without using smart pointers, so implementing anything
that would copy or move around one of these will require some care. Just forbid these
for now.
This commit is contained in:
Andrew McCreight 2015-07-23 12:28:30 -07:00
parent 4d7b5da27d
commit cac4930219

View File

@ -32,8 +32,14 @@ class nsDiscriminatedUnion
public:
nsDiscriminatedUnion() : mType(nsIDataType::VTYPE_EMPTY) {}
nsDiscriminatedUnion(const nsDiscriminatedUnion&) = delete;
nsDiscriminatedUnion(nsDiscriminatedUnion&&) = delete;
~nsDiscriminatedUnion() { Cleanup(); }
nsDiscriminatedUnion& operator=(const nsDiscriminatedUnion&) = delete;
nsDiscriminatedUnion& operator=(nsDiscriminatedUnion&&) = delete;
void Cleanup();
uint16_t GetType() const { return mType; }