mirror of
https://github.com/edubart/otclient.git
synced 2025-10-19 05:53:26 +02:00
force use of template version of std::min/max
This commit is contained in:
@@ -89,7 +89,7 @@ bool AdaptativeFrameCounter::update()
|
||||
|
||||
void AdaptativeFrameCounter::setMaxFps(int maxFps)
|
||||
{
|
||||
maxFps = std::max(std::min(maxFps, 1000), 0);
|
||||
maxFps = std::max<int>(std::min<int>(maxFps, 1000), 0);
|
||||
|
||||
if(maxFps != 0) {
|
||||
m_bestFrameDelay = 1000000 / maxFps;
|
||||
|
@@ -209,7 +209,7 @@ const std::vector<Point>& BitmapFont::calculateGlyphsPositions(const std::string
|
||||
lineWidths[lines] += m_glyphsSize[glyph].width() ;
|
||||
if((i+1 != textLength && text[i+1] != '\n')) // only add space if letter is not the last or before a \n.
|
||||
lineWidths[lines] += m_glyphSpacing.width();
|
||||
maxLineWidth = std::max(maxLineWidth, lineWidths[lines]);
|
||||
maxLineWidth = std::max<int>(maxLineWidth, lineWidths[lines]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -149,8 +149,8 @@ Size FrameBuffer::getSize()
|
||||
{
|
||||
if(m_fbo == 0) {
|
||||
// the buffer size is limited by the window size
|
||||
return Size(std::min(m_texture->getWidth(), g_window.getWidth()),
|
||||
std::min(m_texture->getHeight(), g_window.getHeight()));
|
||||
return Size(std::min<int>(m_texture->getWidth(), g_window.getWidth()),
|
||||
std::min<int>(m_texture->getHeight(), g_window.getHeight()));
|
||||
}
|
||||
return m_texture->getSize();
|
||||
}
|
||||
|
Reference in New Issue
Block a user