Skip to content

Commit 6776a44

Browse files
Refactoring
1 parent 80b4c0d commit 6776a44

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/Windows/Locale.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,16 @@ namespace Windows
2323

2424
// Collect all locales
2525
std::vector<std::wstring> locales;
26-
EnumSystemLocalesEx([](LPWSTR lpLocaleString, DWORD, LPARAM lParam) -> BOOL {
26+
EnumSystemLocalesEx([](LPWSTR lpLocaleString, DWORD, LPARAM lParam) -> BOOL
27+
{
2728
auto* locales = reinterpret_cast<std::vector<std::wstring>*>(lParam);
2829
locales->emplace_back(lpLocaleString);
2930
return TRUE;
3031
}, LOCALE_ALL, reinterpret_cast<LPARAM>(&locales), nullptr);
3132

3233
// Find one that starts with the partial name
33-
for (const auto& loc : locales) {
34+
for (const auto& loc : locales)
35+
{
3436
if (_wcsnicmp(loc.c_str(), wpartial.c_str(), wpartial.size()) == 0)
3537
return QString::fromStdWString(loc);
3638
}

0 commit comments

Comments
 (0)