Qualify calls to certain functions from the cmath library.

This commit is contained in:
Erwin Coumans
2019-03-14 16:57:50 -07:00
parent 1161a04c56
commit 150a6a0880
13 changed files with 53 additions and 34 deletions

View File

@@ -11,6 +11,8 @@
#include <math.h>
#include <cmath>
namespace Gwen
{
namespace Renderer
@@ -87,16 +89,16 @@ void Base::Translate(int& x, int& y)
x += m_RenderOffset.x;
y += m_RenderOffset.y;
x = ceil(((float)x) * m_fScale);
y = ceil(((float)y) * m_fScale);
x = std::ceil(((float)x) * m_fScale);
y = std::ceil(((float)y) * m_fScale);
}
void Base::Translate(Gwen::Rect& rect)
{
Translate(rect.x, rect.y);
rect.w = ceil(((float)rect.w) * m_fScale);
rect.h = ceil(((float)rect.h) * m_fScale);
rect.w = std::ceil(((float)rect.w) * m_fScale);
rect.h = std::ceil(((float)rect.h) * m_fScale);
}
void Gwen::Renderer::Base::SetClipRegion(Gwen::Rect rect)
@@ -214,4 +216,4 @@ Gwen::Point Base::MeasureText(Gwen::Font* pFont, const Gwen::UnicodeString& text
return p;
}
} // namespace Renderer
} // namespace Gwen
} // namespace Gwen