Huw Davies (@huw) commented about dlls/sapi/xml.c:
- HRESULT hr;
- while (next_xml_attr(parser, &attr, &end))
- {
if (xml_attr_eq(&attr, L"rate"))
{
if (xmlstr_eq(&attr.value, L"x-slow"))
state.RateAdj = -9;
else if (xmlstr_eq(&attr.value, L"slow"))
state.RateAdj = -4;
else if (xmlstr_eq(&attr.value, L"medium"))
state.RateAdj = 0;
else if (xmlstr_eq(&attr.value, L"fast"))
state.RateAdj = 4;
else if (xmlstr_eq(&attr.value, L"x-fast"))
state.RateAdj = 9;
This would likely be cleaner using a lookup table (likewise for the other commits in this MR).
Also note that the final commit message in this MR is missing the usual `sapi:` prefix