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/.* - tests/.*
- examples/.* - examples/.*
- include/TGUI/Aurora/.* - include/TGUI/Aurora/.*
- include/TGUI/nanosvg/.*

View File

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