зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1442433 - Make nsAtom::mString even more const. r=froydnj
MozReview-Commit-ID: ANm2nrnO4Lb --HG-- extra : rebase_source : 444f72316f047004cddfc2eef947b122db1cb87d
This commit is contained in:
Родитель
9bc7f17b9e
Коммит
ba2ac04f54
|
@ -57,7 +57,7 @@ public:
|
|||
{
|
||||
// See the comment on |mString|'s declaration.
|
||||
MOZ_ASSERT(IsDynamicAtom() || IsHTML5Atom());
|
||||
return nsStringBuffer::FromData(mString);
|
||||
return nsStringBuffer::FromData(const_cast<char16_t*>(mString));
|
||||
}
|
||||
|
||||
// A hashcode that is better distributed than the actual atom pointer, for
|
||||
|
@ -99,7 +99,7 @@ protected:
|
|||
// non-static atoms it points to the chars in an nsStringBuffer. This means
|
||||
// that nsStringBuffer::FromData(mString) calls are only valid for non-static
|
||||
// atoms.
|
||||
char16_t* const mString;
|
||||
const char16_t* const mString;
|
||||
};
|
||||
|
||||
// A trivial subclass of nsAtom that can be used for known static atoms. The
|
||||
|
|
Загрузка…
Ссылка в новой задаче