diff options
author | Dualtagh Murray <dualtagh.murray@gonitro.com> | 2018-10-04 14:38:52 +0100 |
---|---|---|
committer | RĂ©mi Verschelde <rverschelde@gmail.com> | 2018-10-19 11:45:24 +0200 |
commit | b902a2f2a7438810cdcb053568ed5c27089b1e8a (patch) | |
tree | 0a70fb9dd0093ea6f3ad024616c665f9669077ff /scene/resources | |
parent | a3072aa35e3bfd69d826fa33328b3ce1862f472a (diff) |
Fixing warnings generated by MSVC
Fixes #22684.
Diffstat (limited to 'scene/resources')
-rw-r--r-- | scene/resources/convex_polygon_shape.cpp | 3 | ||||
-rw-r--r-- | scene/resources/dynamic_font.cpp | 4 |
2 files changed, 3 insertions, 4 deletions
diff --git a/scene/resources/convex_polygon_shape.cpp b/scene/resources/convex_polygon_shape.cpp index 9d47bca5ed..39488760cd 100644 --- a/scene/resources/convex_polygon_shape.cpp +++ b/scene/resources/convex_polygon_shape.cpp @@ -38,10 +38,9 @@ Vector<Vector3> ConvexPolygonShape::_gen_debug_mesh_lines() { if (points.size() > 3) { - QuickHull qh; Vector<Vector3> varr = Variant(points); Geometry::MeshData md; - Error err = qh.build(varr, md); + Error err = QuickHull::build(varr, md); if (err == OK) { Vector<Vector3> lines; lines.resize(md.edges.size() * 2); diff --git a/scene/resources/dynamic_font.cpp b/scene/resources/dynamic_font.cpp index 6790c35c4b..458cbf6718 100644 --- a/scene/resources/dynamic_font.cpp +++ b/scene/resources/dynamic_font.cpp @@ -201,10 +201,10 @@ Error DynamicFontAtSize::_load() { if (FT_HAS_COLOR(face)) { int best_match = 0; - int diff = ABS(id.size - face->available_sizes[0].width); + int diff = ABS(id.size - ((int64_t)face->available_sizes[0].width)); scale_color_font = float(id.size) / face->available_sizes[0].width; for (int i = 1; i < face->num_fixed_sizes; i++) { - int ndiff = ABS(id.size - face->available_sizes[i].width); + int ndiff = ABS(id.size - ((int64_t)face->available_sizes[i].width)); if (ndiff < diff) { best_match = i; diff = ndiff; |