Bug 1613411 - Remove unnecessary const_cast. r=dom-workers-and-storage-reviewers,janv

Differential Revision: https://phabricator.services.mozilla.com/D61700

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Simon Giesecke 2020-02-05 16:09:52 +00:00
parent bb6caf4ceb
commit fd8148e7ed

View File

@ -93,8 +93,8 @@ class LSValue final {
CopyUTF8toUTF16(aValue.mBuffer, mBuffer);
}
}
Converter(Converter&& aOther) : mBuffer(aOther.mBuffer) {}
~Converter() {}
Converter(Converter&& aOther) = default;
~Converter() = default;
operator const nsString&() const { return mBuffer; }
@ -105,7 +105,7 @@ class LSValue final {
Converter& operator=(const Converter&&) = delete;
};
Converter AsString() const { return Converter(const_cast<LSValue&>(*this)); }
Converter AsString() const { return Converter{*this}; }
};
const LSValue& VoidLSValue();