Removed warnings from nanosvg when compiling TGUI

0.8
Bruno Van de Velde 2019-03-09 22:35:08 +01:00
parent 854dc949d0
commit 80c44d74ad
5 changed files with 685 additions and 684 deletions

View File

@ -11,3 +11,4 @@ ignore:
- tests/.*
- examples/.*
- include/TGUI/Aurora/.*
- include/TGUI/nanosvg/.*

View File

@ -32,11 +32,11 @@
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
class NSVGimage;
class NSVGrasterizer;
namespace tgui
{
class NSVGimage;
class NSVGrasterizer;
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// @internal
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -73,7 +73,7 @@ namespace tgui
Vector2f SvgImage::getSize() const
{
if (m_svg)
return {m_svg->width, m_svg->height};
return {static_cast<float>(m_svg->width), static_cast<float>(m_svg->height)};
else
return {0, 0};
}
@ -94,8 +94,8 @@ namespace tgui
return;
}
float scaleX = size.x / m_svg->width;
float scaleY = size.y / m_svg->height;
float scaleX = size.x / static_cast<float>(m_svg->width);
float scaleY = size.y / static_cast<float>(m_svg->height);
float scale = std::min(scaleX, scaleY);
auto pixels = std::make_unique<unsigned char[]>(size.x * size.y * 4);