19 Dec
2011
19 Dec
'11
4:07 a.m.
Aric Stewart <aric(a)codeweavers.com> writes:
+ while (k < GET_BE_DWORD(format->nGroups)) + { + if (GET_BE_DWORD(format->groups[k].startCharCode) > utf32c) + break; + if (GET_BE_DWORD(format->groups[k].endCharCode) < utf32c) + k++; + else + { + DWORD offset = utf32c - GET_BE_DWORD(format->groups[k].startCharCode); + *pgi = GET_BE_DWORD(format->groups[k].startGlyphID) + offset; + return 0; + }
You probably want a binary search. Also do we really need a new source file for such a small function? -- Alexandre Julliard julliard(a)winehq.org