mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-17 14:08:03 -06:00
Fix type mismatch
msys2 was reporting the following error:
```
D:/a/qbittorent_msys2/qbittorent_msys2/src/qBittorrent/src/app/application.cpp: In member function 'void Application::applyMemoryWorkingSetLimit()':
D:/a/qbittorent_msys2/qbittorent_msys2/src/qBittorrent/src/app/application.cpp:777:36: error: no matching function for call to 'min(unsigned int, long unsigned int)'
777 | const SIZE_T minSize = std::min((64 * MiB), (maxSize / 2));
| ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
```
This commit is contained in:
@@ -774,7 +774,7 @@ void Application::applyMemoryWorkingSetLimit()
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
const SIZE_T maxSize = memoryWorkingSetLimit() * MiB;
|
||||
const SIZE_T minSize = std::min((64 * MiB), (maxSize / 2));
|
||||
const auto minSize = std::min<SIZE_T>((64 * MiB), (maxSize / 2));
|
||||
if (!::SetProcessWorkingSetSizeEx(::GetCurrentProcess(), minSize, maxSize, QUOTA_LIMITS_HARDWS_MAX_ENABLE))
|
||||
{
|
||||
const DWORD errorCode = ::GetLastError();
|
||||
|
||||
Reference in New Issue
Block a user