Commit 6f4b83bc authored by Dan Hipschman's avatar Dan Hipschman Committed by Alexandre Julliard

widl: Replace a loop with a simple computation.

parent 6a585fca
......@@ -605,13 +605,7 @@ unsigned long lhash_val_of_name_sys( syskind_t 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) */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment