From 002d56d8b3bccdbdc80809e0dd74838c80c404c8 Mon Sep 17 00:00:00 2001 From: Chocobo1 Date: Sun, 8 May 2022 16:48:29 +0800 Subject: [PATCH] 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)); | ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~ ``` --- src/app/application.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/application.cpp b/src/app/application.cpp index f7f48a158..120854475 100644 --- a/src/app/application.cpp +++ b/src/app/application.cpp @@ -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((64 * MiB), (maxSize / 2)); if (!::SetProcessWorkingSetSizeEx(::GetCurrentProcess(), minSize, maxSize, QUOTA_LIMITS_HARDWS_MAX_ENABLE)) { const DWORD errorCode = ::GetLastError();