make compile with more stupid compiler

This commit is contained in:
Patrick von Reth 2015-04-24 15:34:30 +02:00
parent 75d4877b1c
commit 9b4f390a0b
1 changed files with 2 additions and 2 deletions

View File

@ -28,7 +28,7 @@ void bringToFront(QString pid)
auto findWindowForPid = [](ulong pid) { auto findWindowForPid = [](ulong pid) {
// based on http://stackoverflow.com/a/21767578 // based on http://stackoverflow.com/a/21767578
pair<ulong, HWND> data = make_pair(pid, (HWND)0); pair<ulong, HWND> data = make_pair(pid, (HWND)0);
::EnumWindows([](HWND handle, LPARAM lParam) -> BOOL { ::EnumWindows((WNDENUMPROC)static_cast<BOOL(*)(HWND,LPARAM)>([](HWND handle, LPARAM lParam) -> BOOL {
auto isMainWindow = [](HWND handle) auto isMainWindow = [](HWND handle)
{ {
return ::GetWindow(handle, GW_OWNER) == (HWND)0 && IsWindowVisible(handle); return ::GetWindow(handle, GW_OWNER) == (HWND)0 && IsWindowVisible(handle);
@ -42,7 +42,7 @@ void bringToFront(QString pid)
} }
data.second = handle; data.second = handle;
return FALSE; return FALSE;
}, (LPARAM)&data); }), (LPARAM)&data);
return data.second; return data.second;
}; };