Zhiyi Zhang (@zhiyi) commented about dlls/uxtheme/stylemap.c:
-/**********************************************************************
MSSTYLES_LookupEnum
- Lookup the value for an enumeration
- PARAMS
pszValueName Value name to lookup
dwEnum Enumeration property ID to search
dwValue Location to store value
- RETURNS
FALSE if value is not found, TRUE otherwise
- */
-BOOL MSSTYLES_LookupEnum(LPCWSTR pszValueName, int dwEnum, int *dwValue) +/* enum_name must be upper case */ +BOOL MSSTYLES_LookupEnum(const WCHAR *enum_name, int enum_type, int *enum_value)
MSSTYLES_LookupEnum() is always used with MSSTYLES_GetPropertyString(). So I think we can introduce a MSSTYLES_GetPropertyEnumValue() and keep all the upper-case conversions there and remove MSSTYLES_LookupEnum().
I have doubts about this series. Surely using wcscmp() is more efficient. But it means future developers always have to worry about using the correct case. Also is it the real bottleneck? Maybe we can use an alternate data structure. For example, store enums of the same type in an array to reduce look-up time and see how much we can reduce.