diff options
| author | Lioncash <mathew1800@gmail.com> | 2014-05-02 22:47:04 -0400 |
|---|---|---|
| committer | Lioncash <mathew1800@gmail.com> | 2014-05-29 21:44:41 -0400 |
| commit | 49b0eef393f4d321928fb0b6093d58a7637cf1da (patch) | |
| tree | 741357c06acd966494684f8fdd4ec89e961d9887 /Source/Core/VideoCommon | |
| parent | 30973459292d734fac12d1fefaf98edf37ad7976 (diff) | |
Remove the min/max functions in CommonFuncs.
The algorithm header has the same functions.
Diffstat (limited to 'Source/Core/VideoCommon')
| -rw-r--r-- | Source/Core/VideoCommon/TextureCacheBase.cpp | 4 | ||||
| -rw-r--r-- | Source/Core/VideoCommon/TextureDecoder_Generic.cpp | 24 | ||||
| -rw-r--r-- | Source/Core/VideoCommon/TextureDecoder_x64.cpp | 5 | ||||
| -rw-r--r-- | Source/Core/VideoCommon/stdafx.h | 3 |
4 files changed, 14 insertions, 22 deletions
diff --git a/Source/Core/VideoCommon/TextureCacheBase.cpp b/Source/Core/VideoCommon/TextureCacheBase.cpp index 6742ac21c5..33ac8e604b 100644 --- a/Source/Core/VideoCommon/TextureCacheBase.cpp +++ b/Source/Core/VideoCommon/TextureCacheBase.cpp @@ -2,6 +2,8 @@ // Licensed under GPLv2 // Refer to the license.txt file included. +#include <algorithm> + #include "Common/FileUtil.h" #include "Common/MemoryUtil.h" @@ -386,7 +388,7 @@ TextureCache::TCacheEntryBase* TextureCache::Load(unsigned int const stage, // D3D doesn't like when the specified mipmap count would require more than one 1x1-sized LOD in the mipmap chain // e.g. 64x64 with 7 LODs would have the mipmap chain 64x64,32x32,16x16,8x8,4x4,2x2,1x1,1x1, so we limit the mipmap count to 6 there - while (g_ActiveConfig.backend_info.bUseMinimalMipCount && max(expandedWidth, expandedHeight) >> maxlevel == 0) + while (g_ActiveConfig.backend_info.bUseMinimalMipCount && std::max(expandedWidth, expandedHeight) >> maxlevel == 0) --maxlevel; TCacheEntryBase *entry = textures[texID]; diff --git a/Source/Core/VideoCommon/TextureDecoder_Generic.cpp b/Source/Core/VideoCommon/TextureDecoder_Generic.cpp index 95ead9c174..30edd16360 100644 --- a/Source/Core/VideoCommon/TextureDecoder_Generic.cpp +++ b/Source/Core/VideoCommon/TextureDecoder_Generic.cpp @@ -1,20 +1,8 @@ -// Copyright (C) 2003 Dolphin Project. - -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, version 2.0. - -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License 2.0 for more details. - -// A copy of the GPL 2.0 should have been included with the program. -// If not, see http://www.gnu.org/licenses/ - -// Official SVN repository and contact information can be found at -// http://code.google.com/p/dolphin-emu/ +// Copyright 2014 Dolphin Emulator Project +// Licensed under GPLv2 +// Refer to the license.txt file included. +#include <algorithm> #include <cmath> #include "Common/Common.h" @@ -1055,8 +1043,8 @@ PC_TexFormat TexDecoder_Decode(u8 *dst, const u8 *src, int width, int height, in if ((!TexFmt_Overlay_Enable) || (retval == PC_TEX_FMT_NONE)) return retval; - int w = min(width, 40); - int h = min(height, 10); + int w = std::min(width, 40); + int h = std::min(height, 10); int xoff = (width - w) >> 1; int yoff = (height - h) >> 1; diff --git a/Source/Core/VideoCommon/TextureDecoder_x64.cpp b/Source/Core/VideoCommon/TextureDecoder_x64.cpp index ae11374538..efe116d39a 100644 --- a/Source/Core/VideoCommon/TextureDecoder_x64.cpp +++ b/Source/Core/VideoCommon/TextureDecoder_x64.cpp @@ -2,6 +2,7 @@ // Licensed under GPLv2 // Refer to the license.txt file included. +#include <algorithm> #include <cmath> #include "Common/Common.h" @@ -2037,8 +2038,8 @@ PC_TexFormat TexDecoder_Decode(u8 *dst, const u8 *src, int width, int height, in if ((!TexFmt_Overlay_Enable) || (retval == PC_TEX_FMT_NONE)) return retval; - int w = min(width, 40); - int h = min(height, 10); + int w = std::min(width, 40); + int h = std::min(height, 10); int xoff = (width - w) >> 1; int yoff = (height - h) >> 1; diff --git a/Source/Core/VideoCommon/stdafx.h b/Source/Core/VideoCommon/stdafx.h index 167fccc549..735aea396a 100644 --- a/Source/Core/VideoCommon/stdafx.h +++ b/Source/Core/VideoCommon/stdafx.h @@ -6,9 +6,10 @@ #define _WIN32_WINNT 0x501 #ifndef _WIN32_IE -#define _WIN32_IE 0x0500 // Default value is 0x0400 +#define _WIN32_IE 0x0500 // Default value is 0x0400 #endif #define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers +#define NOMINMAX // Don't include windows min/max definitions #include <algorithm> |
