mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00:00
really small optimze remove lenvalu * sizeof(WCHAR) so it doing it only one time
svn path=/trunk/; revision=15236
This commit is contained in:
parent
32962bc31c
commit
ade7456218
1 changed files with 4 additions and 4 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue