diff options
author | Campbell Barton <campbell@blender.org> | 2022-09-25 11:33:28 +0300 |
---|---|---|
committer | Campbell Barton <campbell@blender.org> | 2022-09-25 13:17:08 +0300 |
commit | f68cfd6bb078482c4a779a6e26a56e2734edb5b8 (patch) | |
tree | 2878e5b80dba5bdeba186d99661d604eb38879cd /source/blender/io/collada/CameraExporter.cpp | |
parent | c7b247a118e302a3afc6473797e53b6af28b69e2 (diff) |
Cleanup: replace C-style casts with functional casts for numeric types
Diffstat (limited to 'source/blender/io/collada/CameraExporter.cpp')
-rw-r--r-- | source/blender/io/collada/CameraExporter.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/io/collada/CameraExporter.cpp b/source/blender/io/collada/CameraExporter.cpp index 45a73914256..7c3f304b722 100644 --- a/source/blender/io/collada/CameraExporter.cpp +++ b/source/blender/io/collada/CameraExporter.cpp @@ -51,7 +51,7 @@ void CamerasExporter::operator()(Object *ob, Scene *sce) case CAM_PERSP: { COLLADASW::PerspectiveOptic persp(mSW); persp.setXFov(RAD2DEGF(focallength_to_fov(cam->lens, cam->sensor_x)), "xfov"); - persp.setAspectRatio((float)(sce->r.xsch) / (float)(sce->r.ysch), false, "aspect_ratio"); + persp.setAspectRatio(float(sce->r.xsch) / float(sce->r.ysch), false, "aspect_ratio"); persp.setZFar(cam->clip_end, false, "zfar"); persp.setZNear(cam->clip_start, false, "znear"); COLLADASW::Camera ccam(mSW, &persp, cam_id, cam_name); @@ -64,7 +64,7 @@ void CamerasExporter::operator()(Object *ob, Scene *sce) default: { COLLADASW::OrthographicOptic ortho(mSW); ortho.setXMag(cam->ortho_scale / 2, "xmag"); - ortho.setAspectRatio((float)(sce->r.xsch) / (float)(sce->r.ysch), false, "aspect_ratio"); + ortho.setAspectRatio(float(sce->r.xsch) / float(sce->r.ysch), false, "aspect_ratio"); ortho.setZFar(cam->clip_end, false, "zfar"); ortho.setZNear(cam->clip_start, false, "znear"); COLLADASW::Camera ccam(mSW, &ortho, cam_id, cam_name); |