Fix compilation under MSVC

Use template for std::min and std::max
This commit is contained in:
conde2
2013-11-30 23:08:43 -02:00
parent b61f509755
commit ca2fe9cf45
10 changed files with 28 additions and 28 deletions

View File

@@ -170,7 +170,7 @@ bool Texture::setupSize(const Size& size, bool forcePowerOfTwo)
glSize = size;
// checks texture max size
if(std::max(glSize.width(), glSize.height()) > g_graphics.getMaxTextureSize()) {
if(std::max<int>(glSize.width(), glSize.height()) > g_graphics.getMaxTextureSize()) {
g_logger.error(stdext::format("loading texture with size %dx%d failed, "
"the maximum size allowed by the graphics card is %dx%d,"
"to prevent crashes the texture will be displayed as a blank texture",