From 8312b31d2798d16574943259b9ae4522af80b4c6 Mon Sep 17 00:00:00 2001 From: Gargaj Date: Sat, 5 Aug 2023 15:39:47 +0200 Subject: [PATCH 1/2] fix warning-as-error --- code/AssetLib/FBX/FBXConverter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/AssetLib/FBX/FBXConverter.cpp b/code/AssetLib/FBX/FBXConverter.cpp index 032089906..6c7cb67c8 100644 --- a/code/AssetLib/FBX/FBXConverter.cpp +++ b/code/AssetLib/FBX/FBXConverter.cpp @@ -443,7 +443,7 @@ void FBXConverter::ConvertCamera(const Camera &cam, const std::string &orig_name float focal_length_mm = cam.FocalLength(); ASSIMP_LOG_VERBOSE_DEBUG("FBX FOV unspecified. Computing from FilmWidth (", film_width_inches, "inches) and FocalLength (", focal_length_mm, "mm)."); double half_fov_rad = std::atan2(film_width_inches * 25.4 * 0.5, focal_length_mm); - out_camera->mHorizontalFOV = half_fov_rad; + out_camera->mHorizontalFOV = static_cast(half_fov_rad); } else { // FBX fov is full-view degrees. We want half-view radians. out_camera->mHorizontalFOV = AI_DEG_TO_RAD(fov_deg) * 0.5; From 49ed0711d160f2b455463709b1cf9cddeb1446fb Mon Sep 17 00:00:00 2001 From: Gargaj Date: Sat, 5 Aug 2023 15:43:31 +0200 Subject: [PATCH 2/2] Fix another warning --- code/AssetLib/FBX/FBXConverter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/AssetLib/FBX/FBXConverter.cpp b/code/AssetLib/FBX/FBXConverter.cpp index 6c7cb67c8..498da43ca 100644 --- a/code/AssetLib/FBX/FBXConverter.cpp +++ b/code/AssetLib/FBX/FBXConverter.cpp @@ -446,7 +446,7 @@ void FBXConverter::ConvertCamera(const Camera &cam, const std::string &orig_name out_camera->mHorizontalFOV = static_cast(half_fov_rad); } else { // FBX fov is full-view degrees. We want half-view radians. - out_camera->mHorizontalFOV = AI_DEG_TO_RAD(fov_deg) * 0.5; + out_camera->mHorizontalFOV = AI_DEG_TO_RAD(fov_deg) * 0.5f; } out_camera->mClipPlaneNear = cam.NearPlane();