really small optimze remove lenvalu * sizeof(WCHAR) so it doing it only one time

svn path=/trunk/; revision=15236
This commit is contained in:
Magnus Olsen 2005-05-12 05:01:23 +00:00
parent 32962bc31c
commit ade7456218

View file

@ -107,9 +107,9 @@ void SetNewLocale(LCID lcid)
}
wsprintf(value, L"%04X", (DWORD)lcid);
lenvalue = wcslen(value);
lenvalue = wcslen(value) * sizeof(WCHAR);
RegSetValueExW(localeKey, L"Locale", 0, REG_SZ, (BYTE *)value, lenvalue * sizeof(WCHAR));
RegSetValueExW(localeKey, L"Locale", 0, REG_SZ, (BYTE *)value, lenvalue);
RegCloseKey(localeKey);
// Set language
@ -118,8 +118,8 @@ void SetNewLocale(LCID lcid)
if (ret != ERROR_SUCCESS)
return;
RegSetValueExW(langKey, L"Default", 0, REG_SZ, (BYTE *)value, lenvalue * sizeof(WCHAR));
RegSetValueExW(langKey, L"InstallLanguage", 0, REG_SZ, (BYTE *)value, lenvalue * sizeof(WCHAR));
RegSetValueExW(langKey, L"Default", 0, REG_SZ, (BYTE *)value, lenvalue );
RegSetValueExW(langKey, L"InstallLanguage", 0, REG_SZ, (BYTE *)value, lenvalue );
RegCloseKey(langKey);
}