1
0
mirror of https://github.com/d47081/qBittorrent.git synced 2025-02-05 03:14:44 +00: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:
Chocobo1 2022-05-08 16:48:29 +08:00
parent be4a1e7fd7
commit 002d56d8b3
No known key found for this signature in database
GPG Key ID: 210D9C873253A68C

View File

@ -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();