зеркало из https://github.com/mozilla/gecko-dev.git
Added some "const" to code that was retrieving a pointer to the internal
buffer managed by nsString
This commit is contained in:
Родитель
8ebf774ac3
Коммит
17c6b3b2fb
|
@ -449,7 +449,7 @@ public:
|
|||
PRUint32 FontAliasKey::HashValue(void) const
|
||||
{
|
||||
PRUint32 hash = 0;
|
||||
PRUnichar* string = mString;
|
||||
const PRUnichar* string = mString;
|
||||
PRUnichar ch;
|
||||
while ((ch = *string++) != 0) {
|
||||
// FYI: hash = hash*37 + ch
|
||||
|
|
|
@ -103,7 +103,8 @@ PRBool nsFont::EnumerateFamilies(nsFontFamilyEnumFunc aFunc, void* aData) const
|
|||
|
||||
familyList.Append(kNullCh); // put an extra null at the end
|
||||
|
||||
PRUnichar* start = (PRUnichar*)familyList;
|
||||
// XXX This code is evil...
|
||||
PRUnichar* start = (PRUnichar*)(const PRUnichar*)familyList;
|
||||
PRUnichar* end = start;
|
||||
|
||||
while (running && (kNullCh != *start)) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче