Browse Source

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));
      |                            ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
```
adaptive-webui-19844
Chocobo1 3 years ago
parent
commit
002d56d8b3
No known key found for this signature in database
GPG Key ID: 210D9C873253A68C
  1. 2
      src/app/application.cpp

2
src/app/application.cpp

@ -774,7 +774,7 @@ void Application::applyMemoryWorkingSetLimit() @@ -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();

Loading…
Cancel
Save