mirror of
https://github.com/EduApps-CDG/OpenDX
synced 2024-12-30 09:45:37 +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:
parent
e9c7dcfc76
commit
311748ee09
@ -115,7 +115,7 @@ namespace dxvk {
|
|||||||
return DXGI_ERROR_NOT_FOUND;
|
return DXGI_ERROR_NOT_FOUND;
|
||||||
|
|
||||||
// Select mode with minimal height+width difference
|
// Select mode with minimal height+width difference
|
||||||
UINT minDifference = UINT_MAX;
|
UINT minDifference = std::numeric_limits<unsigned int>::max();
|
||||||
|
|
||||||
for (auto& mode : modes) {
|
for (auto& mode : modes) {
|
||||||
UINT currDifference = std::abs(int(pModeToMatch->Width - mode.Width))
|
UINT currDifference = std::abs(int(pModeToMatch->Width - mode.Width))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user