mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 21:31:04 +00:00
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:
parent
bb6caf4ceb
commit
fd8148e7ed
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user