1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-01-18 02:52:10 +01:00

[dxgi] Replace UINT_MAX with std::numeric_limits (#234)

`limits.h` required for `UINT_MAX` and not always used, so better to use standard C++ variant from `<limits>`.

Some compilers may simply return `UINT_MAX` value, gcc version: `max() _GLIBCXX_USE_NOEXCEPT { return __INT_MAX__ * 2U + 1; }`.
This commit is contained in:
pchome 2018-04-02 19:49:19 +03:00 committed by Philip Rebohle
parent e9c7dcfc76
commit 311748ee09

View File

@ -115,7 +115,7 @@ namespace dxvk {
return DXGI_ERROR_NOT_FOUND;
// Select mode with minimal height+width difference
UINT minDifference = UINT_MAX;
UINT minDifference = std::numeric_limits<unsigned int>::max();
for (auto& mode : modes) {
UINT currDifference = std::abs(int(pModeToMatch->Width - mode.Width))