diff options
author | Campbell Barton <campbell@blender.org> | 2022-09-25 13:27:46 +0300 |
---|---|---|
committer | Campbell Barton <campbell@blender.org> | 2022-09-25 15:31:31 +0300 |
commit | 21d77a417e17ac92bfc10dbd742c867d4019ce69 (patch) | |
tree | ec664b5c6ca7882bcc5a1e1ce09cad67b842af9d /intern/libmv | |
parent | d35a10134cfdbd3e24a56218ef3f05aac2a2fc7e (diff) |
Cleanup: replace C-style casts with functional casts for numeric types
Some changes missed from f68cfd6bb078482c4a779a6e26a56e2734edb5b8.
Diffstat (limited to 'intern/libmv')
-rw-r--r-- | intern/libmv/libmv/simple_pipeline/keyframe_selection.cc | 2 | ||||
-rw-r--r-- | intern/libmv/libmv/simple_pipeline/pipeline.cc | 12 |
2 files changed, 7 insertions, 7 deletions
diff --git a/intern/libmv/libmv/simple_pipeline/keyframe_selection.cc b/intern/libmv/libmv/simple_pipeline/keyframe_selection.cc index 5526d730651..e3e59171b63 100644 --- a/intern/libmv/libmv/simple_pipeline/keyframe_selection.cc +++ b/intern/libmv/libmv/simple_pipeline/keyframe_selection.cc @@ -333,7 +333,7 @@ void SelectKeyframesBasedOnGRICAndVariance(const Tracks& _tracks, } double success_intersects_factor = - (double)intersects_success / intersects_total; + double(intersects_success) / intersects_total; if (success_intersects_factor < success_intersects_factor_best) { LG << "Skip keyframe candidate because of " diff --git a/intern/libmv/libmv/simple_pipeline/pipeline.cc b/intern/libmv/libmv/simple_pipeline/pipeline.cc index 5d52aeb7406..7203ddf1329 100644 --- a/intern/libmv/libmv/simple_pipeline/pipeline.cc +++ b/intern/libmv/libmv/simple_pipeline/pipeline.cc @@ -180,7 +180,7 @@ void InternalCompleteReconstruction( << " reconstructed markers for track " << track; if (reconstructed_markers.size() >= 2) { CompleteReconstructionLogProgress(update_callback, - (double)tot_resects / (max_image)); + double(tot_resects) / (max_image)); if (PipelineRoutines::Intersect(reconstructed_markers, reconstruction)) { num_intersects++; @@ -192,7 +192,7 @@ void InternalCompleteReconstruction( } if (num_intersects) { CompleteReconstructionLogProgress( - update_callback, (double)tot_resects / (max_image), "Bundling..."); + update_callback, double(tot_resects) / (max_image), "Bundling..."); PipelineRoutines::Bundle(tracks, reconstruction); LG << "Ran Bundle() after intersections."; } @@ -218,7 +218,7 @@ void InternalCompleteReconstruction( << " reconstructed markers for image " << image; if (reconstructed_markers.size() >= 5) { CompleteReconstructionLogProgress(update_callback, - (double)tot_resects / (max_image)); + double(tot_resects) / (max_image)); if (PipelineRoutines::Resect( reconstructed_markers, reconstruction, false)) { num_resects++; @@ -231,7 +231,7 @@ void InternalCompleteReconstruction( } if (num_resects) { CompleteReconstructionLogProgress( - update_callback, (double)tot_resects / (max_image), "Bundling..."); + update_callback, double(tot_resects) / (max_image), "Bundling..."); PipelineRoutines::Bundle(tracks, reconstruction); } LG << "Did " << num_resects << " resects."; @@ -254,7 +254,7 @@ void InternalCompleteReconstruction( } if (reconstructed_markers.size() >= 5) { CompleteReconstructionLogProgress(update_callback, - (double)tot_resects / (max_image)); + double(tot_resects) / (max_image)); if (PipelineRoutines::Resect( reconstructed_markers, reconstruction, true)) { num_resects++; @@ -266,7 +266,7 @@ void InternalCompleteReconstruction( } if (num_resects) { CompleteReconstructionLogProgress( - update_callback, (double)tot_resects / (max_image), "Bundling..."); + update_callback, double(tot_resects) / (max_image), "Bundling..."); PipelineRoutines::Bundle(tracks, reconstruction); } } |