This commit is contained in:
dougt%netscape.com 2002-01-14 20:10:48 +00:00
Родитель 7490c158ee
Коммит 902facd5e3
1 изменённых файлов: 4 добавлений и 0 удалений

Просмотреть файл

@ -273,6 +273,8 @@ PRUint32 nsCRT::HashCode(const char* str, PRUint32* resultingStrLen)
PRUint32 h = 0; PRUint32 h = 0;
const char* s = str; const char* s = str;
if (!str) return h;
unsigned char c; unsigned char c;
while ( (c = *s++) ) while ( (c = *s++) )
h = (h>>28) ^ (h<<4) ^ c; h = (h>>28) ^ (h<<4) ^ c;
@ -287,6 +289,8 @@ PRUint32 nsCRT::HashCode(const PRUnichar* str, PRUint32* resultingStrLen)
PRUint32 h = 0; PRUint32 h = 0;
const PRUnichar* s = str; const PRUnichar* s = str;
if (!str) return h;
{ {
PRUint16 W1 = 0; // the first UTF-16 word in a two word tuple PRUint16 W1 = 0; // the first UTF-16 word in a two word tuple
PRUint32 U = 0; // the current char as UCS-4 PRUint32 U = 0; // the current char as UCS-4