mirror of
https://github.com/reactos/wine.git
synced 2025-01-24 04:45:18 +00:00
oleaut32: Replace a loop with a simple computation.
This commit is contained in:
parent
6f4b83bce0
commit
b6e6d4b511
@ -608,13 +608,7 @@ ULONG WINAPI LHashValOfNameSysA( SYSKIND skind, LCID lcid, LPCSTR lpStr)
|
||||
|
||||
while (*str)
|
||||
{
|
||||
ULONG newLoWord = 0, i;
|
||||
|
||||
/* Cumulative prime multiplication (*37) with modulo 2^32 wrap-around */
|
||||
for (i = 0; i < 37; i++)
|
||||
newLoWord += nLoWord;
|
||||
|
||||
nLoWord = newLoWord + pnLookup[*str > 0x7f && nMask ? *str + 0x80 : *str];
|
||||
nLoWord = 37 * nLoWord + pnLookup[*str > 0x7f && nMask ? *str + 0x80 : *str];
|
||||
str++;
|
||||
}
|
||||
/* Constrain to a prime modulo and sizeof(WORD) */
|
||||
|
Loading…
x
Reference in New Issue
Block a user